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

พลิกภาพบนเมาส์ด้วย CSS


ใช้คุณสมบัติการแปลง CSS เพื่อพลิกรูปภาพ คุณสามารถลองเรียกใช้รหัสต่อไปนี้เพื่อพลิกภาพเมื่อวางเมาส์:

ตัวอย่าง

<!DOCTYPE html>
<html>
   <head>
      <style>
         .myimg:hover {
            transform: scaleX(-1);
         }
      </style>
   </head>
   <body>
      <h2>Heading One</h2>
      <p>Let's flip the image on mouse over:</p>
      <img class = "myimg" src = "https://www.tutorialspoint.com/python/images/python_data_science.jpg"
         alt = "Python Data Science" width = "300" height = "200">
   </body>
</html>