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

การใช้คุณสมบัติการแปลงด้วย CSS


คุณสมบัติการแปลงใน CSS ใช้เพื่อนำการแปลง 2D หรือ 3D ไปใช้กับองค์ประกอบ คุณสามารถลองใช้รหัสต่อไปนี้เพื่อใช้คุณสมบัติการแปลง -

ตัวอย่าง

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 200px;
            height: 100px;
            background-color: gray;
            transform: rotate(10deg);
         }
      </style>
   </head>
   <body>
      <h1>Rotation</h1>
      <div>Demo</div>
   </body>
</html>