这是一个例子:http://jsfiddle.net/575FE/
HTML:
<div id="block">
SOME TEXT
</div>
CSS:
#block {
height: 200px;
width: 200px;
background-color: yellow;
-moz-transition: 0.6s all;
-webkit-transition: 0.6s all;
-o-transition: 0.6s all;
transition: 0.6s all;
display: inline-block;
}
#block:hover {
height: 400px;
width: 400px;
background-color: blue;
position: absolute;
}
inline-block + absolute的组合使得转换在safari中不起作用。 谁知道怎么修它 ? 感谢。
答案 0 :(得分:0)
从#block:hover
<强> Updated DEMO 强>
#block:hover {
height: 400px;
width: 400px;
background-color: blue;
}