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

พลิกภาพเมื่อ Hover ด้วย CSS

ใช้คุณสมบัติ transform ใน CSS เพื่อพลิกภาพ ตัวอย่างพลิกแนวนอนเมื่อ hover

ตัวอย่าง

<!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>