CuDemVN.Wap.Sh




Share code hiệu ứng xoay và phóng to hình ảnh không dùng JavaScript, Không ảnh hưởng đến tốc độ Load
![]() | ![]() ![]() ![]() |
Chỉ với một đoạn code CSS nhỏ không cần dùng JavaScript bạn có thể tạo ra một hiệu ứng hình ảnh rất chuyên nghiệp làm cho trang Web/Wap của bạn thêm sinh động. Chỉ dùng CSS nên cực nhẹ không hề ảnh hưởng đến tốc độ load trang của bạn dù truy cập bằng trình duyệt Mobile/PC.
Copy đoạn code này dán vào file CSS của bạn:
#QDK {
padding: 1px;
margin: 4px 4px 0 0;
border: 1px solid #d5d5d5;
transition: all 15s ease;
-webkit-transition: all 15s ease;
-moz-transition: all 15s ease;
transition-delay: 5s;
-webkit-transition-delay: 5s;
-moz-transition-delay: 5s;
transform: rotate(0deg);
-moz-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
width: 120px;
}
/* Design By WapVN.Mobi */
#QDK:hover {
box-shadow: 0px 0px 10px #666;
-moz-box-shadow: 0px 0px 10px #666;
-webkit-box-shadow: 0px 0px 10px #666;
border-radius: 5px;
background-color: #ffffff;
padding: 5px;
transition: all 3s ease;
-webkit-transition: all 3s ease;
-moz-transition: all 3s ease;
transform: rotate(360deg);
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
position: relative;
width: 365px;
}
Thêm thuộc tính id="QDK" vào thẻ hiển thị hình ảnh <img src=""/> (loại bỏ thuộc tính width/height trong thẻ <img src=""/> của bạn nhé)
Ví dụ:
<img id="QDK" src="link ảnh" />
Nguồn: Quyetdaik

Đánh giá: 4.5/ 5, 862 bình chọn
