CSS3: Cách xoay ảnh khi chạm chuột vào dùng CSS3


Khóa học qua video:
Lập trình Python All Lập trình C# All SQL Server All Lập trình C All Java PHP HTML5-CSS3-JavaScript
Đăng ký Hội viên
Tất cả các video dành cho hội viên

Bạn copy đoạn code này và thử nhé, lưu ý thay ULR-ảnh bằng một nguồn ảnh cụ thể nhé:

<!DOCTYPE html>
<html>
<head>
  <title>Xoa ảnh khi chạm chuột</title>
  <style>
    .img{
      text-align:center;
    }
    .img img{
      transition:transform 10s;
      -webkit-transition:transform 10s;
      -moz-transition:transform 10s;
      -o-transition:transform 10s;
    }
    .img img:hover{
      transform:rotateY(360deg);
      -webkit-transform:rotateY(360deg);
      -o-transform:rotateY(360deg);
      -moz-transform:rotateY(360deg)
    }
  </style>
</head>
<body>
<section class="img">
  <img src="ULR-ảnh">
</section>
</body>
</html>

Kết quả demo:

Hãy chạm chuột vào ảnh dưới đây để thấy hiệu ứng:

» Tiếp: CSS: alignment-adjust
« Trước: Flex Responsive
Khóa học qua video:
Lập trình Python All Lập trình C# All SQL Server All Lập trình C All Java PHP HTML5-CSS3-JavaScript
Đăng ký Hội viên
Tất cả các video dành cho hội viên
Copied !!!