html5 图片旋转 --位置定位

<!DOCTYPE html>
<html>
<head>
<style> 
div
{
width:100px;
height:100px;
background:yellow;
transition:width 2s, height 2s;
-moz-transition:width 2s, height 2s, -moz-transform 2s; /* Firefox 4 */
-webkit-transition:width 2s, height 2s, -webkit-transform 2s; /* Safari and Chrome */
-o-transition:width 2s, height 2s, -o-transform 2s; /* Opera */
}

div:hover
{
width:200px;
height:200px;
transform:rotate(180deg);
-moz-transform:rotate(180deg); /* Firefox 4 */
-webkit-transform:rotate(180deg); /* Safari and Chrome */
-o-transform:rotate(180deg); /* Opera */
-webkit-transform:translate(200px,200px); /* 到达的位置*/
} </style> </head> <body> <div>请把鼠标指针放到黄色的 div 元素上,来查看过渡效果。</div> <p><b>注释:</b>本例在 Internet Explorer 中无效。</p> </body> </html>

 

posted on 2017-08-03 10:22  奔跑的葛根  阅读(315)  评论(0编辑  收藏  举报

导航