[color=red][size=x-large]复制代码即可[/size][/color]
[color=red][size=large]效果如下[/size][/color]
[img]http://dl2.iteye.com/upload/attachment/0122/5049/9c612335-f33c-3291-ba5f-3e522227ef76.png[/img]
[color=orange][size=medium]要添加多个样式的变换效果,添加的属性由逗号分隔[/size][/color]
[img]http://dl2.iteye.com/upload/attachment/0122/5053/e9296f8a-34a7-3f62-9ec7-adc05804cc6d.png[/img]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
width: 100px;
height: 100px;
background: red;
-webkit-transition: width 2s, height 2s, -webkit-transform 2s; /* For Safari 3.1 to 6.0 */
transition: width 2s, height 2s, transform 2s, background 1s;
}
div:hover {
width: 200px;
height: 200px;
background:blue;
-webkit-transform: rotate(180deg); /* Chrome, Safari, Opera */
transform: rotate(180deg);
}
</style>
</head>
<body>
<p><b>注意:</b>该实例无法在 Internet Explorer 9 及更早 IE 版本上工作。</p>
<div>鼠标移动到 div 元素上,查看过渡效果。</div>
</body>
</html>
[color=red][size=large]效果如下[/size][/color]
[img]http://dl2.iteye.com/upload/attachment/0122/5049/9c612335-f33c-3291-ba5f-3e522227ef76.png[/img]
[color=orange][size=medium]要添加多个样式的变换效果,添加的属性由逗号分隔[/size][/color]
[img]http://dl2.iteye.com/upload/attachment/0122/5053/e9296f8a-34a7-3f62-9ec7-adc05804cc6d.png[/img]
本文介绍了一个使用CSS实现的过渡效果示例,当鼠标悬停在div元素上时,元素的大小、背景颜色和旋转角度会发生平滑变化。此示例不支持Internet Explorer 9及其更低版本。
1330

被折叠的 条评论
为什么被折叠?



