เมธอด rotateZ()
ใช้ rotateZ(angle) เพื่อหมุนองค์ประกอบรอบแกน Z (แกนที่ตั้งฉากกับหน้าจอ)
ตัวอย่าง
<html>
<head>
<style>
div {
width: 200px;
height: 100px;
background-color: pink;
border: 1px solid black;
}
div#zDiv {
-webkit-transform: rotateZ(90deg); /* Safari */
transform: rotateZ(90deg); /* Standard syntax */
}
</style>
</head>
<body>
<p>rotate Z axis</p>
<div id="zDiv">tutorials point.com.</div>
</body>
</html>