rotateZ()

规定围绕Z轴旋转。

 

语法

rotateZ(angle)

描述
angle 规定旋转的角度。正数的角度表示顺时针旋转,负数的角度表示逆时针旋转。

例子

HTML

<div class="stage">
  <div class="box">transform:rotateX(60deg)</div>
</div>

CSS

.stage{
  height:200px;
  padding-top:50px;
}
.box{
  width:350px;
  height:50px;
  background:red;
  font-size:20px;
  color:#fff;
  transform:rotateZ(30deg);//沿着 Z 轴的3D旋转30度。
}

执行结果

transform:rotateX(60deg)

参考

相关页面