<html> |
|
<head lang="en"> |
|
<meta charset="UTF-8"> |
|
<title></title> |
|
<style> |
|
|
|
.trans1{ |
|
-webkit-transition:0.5s ease; |
|
-moz-transition:0.5s ease; |
|
-webkit-transition-property:all; |
|
-moz-transition-property:all; |
|
position:absolute; |
|
left:10px; |
|
top:50px; |
|
height:100px; |
|
100px; |
|
background:#ef4900; |
|
color:white; |
|
} |
|
.trans2{ |
|
-webkit-transition:0.5s ease-in-out; |
|
-moz-transition:0.5s ease-in-out; |
|
-webkit-transition-property:width; |
|
-moz-transition-property:width; |
|
position:absolute; |
|
left:350px; |
|
top:50px; |
|
height:100px; |
|
100px; |
|
background:blue; |
|
color:yellow; |
|
} |
|
.trans3{ |
|
-webkit-transition:0.5s ease; |
|
-moz-transition:0.5s ease; |
|
-webkit-transition-property:height; |
|
-moz-transition-property:height; |
|
100px; |
|
height:100px; |
|
background:green; |
|
color:#ccc; |
|
position:absolute; |
|
left:780px; |
|
top:50px; |
|
|
|
} |
|
.trans1:hover{ |
|
300px; |
|
height:300px; |
|
} |
|
.trans2:hover{ |
|
300px; |
|
} |
|
.trans3:hover{ |
|
height:300px; |
|
} |
|
</style> |
|
</head> |
|
<body> |
|
<div class="trans1">变换所有s属性</div> |
|
<div class="trans2">变换宽度属性</div> |
|
<div class="trans3">变换高度属性</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body> |
|
</html> |