CSS3旋转与大小渐变

NARUTOLUOLUO 2017-09-18

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>旋转渐变</title>
<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;
   
}

div:hover {
    width: 200px;
    height: 200px;
    -webkit-transform: rotate(360deg); /* Chrome, Safari, Opera */
    transform: rotate(360deg);
}
</style>
</head>
<body>
<p><b>注意:</b>该实例无法在 Internet Explorer 9 及更早 IE 版本上工作。</p>

<div>鼠标移动到 div 元素上,查看过渡效果。</div>
</body>
</html>

相关推荐