CSS transition 示例
html公开前 25 行,完整代码需登录
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.box {
width: 100px;
height: 100px;
background-color: #3498db;
transition: all 0.3s ease 0s;
margin: 20px;
cursor: pointer;
}
.box:hover {
width: 200px;
height: 200px;
background-color: #e74c3c;
transform: rotate(45deg);
}
.button {
padding: 10px 20px;
background-color: #2ecc71;
color: white;
border: none;