CSS3 允许您使用 3D 转换来对元素进行格式化。
在本章中,您将学到其中的一些 3D 转换方法:
- rotateX()
- rotateY()
rotateX() 方法
rotateX()方法,围绕其在一个给定度数X轴旋转的元素
div{ ???width:100px; ???height:75px; ???background-color:red; ???border:1px solid black;}div#div2{ ???transform:rotateX(120deg); ???-webkit-transform:rotateX(120deg); /* Safari and Chrome */}</style>
rotateY() 方法
rotateY()方法,围绕其在一个给定度数Y轴旋转的元素。
<style> div{ ???width:100px; ???height:75px; ???background-color:red; ???border:1px solid black;}div#div2{ ???transform:rotateY(130deg); ???-webkit-transform:rotateY(130deg); /* Safari and Chrome */}</style>
CSS3 3D 转换
原文地址:http://www.cnblogs.com/qlqwjy/p/7466759.html