Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

Transform หมุนบนแกน Y (rotateY) ด้วย CSS3


ใช้เมธอด rotateY(angle) เพื่อหมุน transform องค์ประกอบบนแกน Y ด้วย CSS3

ตัวอย่าง

<html>
  <head>
    <style>
      div {
        width: 200px;
        height: 100px;
        background-color: pink;
        border: 1px solid black;
      }
      div#yDiv {
        -webkit-transform: rotateY(150deg);
        /* Safari */
        transform: rotateY(150deg);
        /* Standard syntax */
      }
    </style>
  </head>
  <body>
    <div>tutorials point.com</div>
    <p>Rotate Y axis</p>
    <div id="yDiv">tutorials point.com.</div>
  </body>
</html>