css3 transform顺序

来源:互联网 发布:手表 推荐知乎 编辑:程序博客网 时间:2024/05/16 14:18
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>transform顺序</title>
<style type="text/css">
html, body{ height:100%;}
#div1{ width:100px; height:100px; margin:100px auto; background:red; transition:1s all ease;}
/* 无透视不成3D,意思就是没有透视的话就没有3D这种感觉,你还是在2D上 */
#div1:hover{transform:scale(2,1) rotate(45deg);}


/* scale的缩放不是以该元素的 */
#div2{ width:100px; height:100px; margin:200px auto; background:black; transition:1s all ease;}
#div2:hover{ transform:rotate(45deg) scale(2,1);}
</style>
</head>


<body>
<div id="div1"></div>
    <div id="div2"></div>
</body>
</html>
0 0
原创粉丝点击