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>