CSS3 hiệu ứng đổi hình ảnh đẹp cho Web, blogspot

0
Với thủ thuật thêm 1 đoạn code CSS3 sẽ làm cho hình ảnh và trang Web, blog của bạn thêm sống động hơn.
bài viết này mình giới thiệu về đoạn code CSS3 thay đổi hình ảnh khá đẹp mắt khi rê chuột vào.
CSS3 hiệu ứng hình ảnh

Demo: http://360anhdep.blogspot.com/p/a.html
Code:

<style type="text/css">

a.nowandthen{
position:relative;
display: block;
overflow:hidden;
cursor: pointer;
width: 650px;
height: 434px;
}

a.nowandthen img{
position:absolute;
left:0;
top:0;
width: 100%;
height: 100%;
-moz-transition: all 0.4s ease;
-webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
-ms-transition: all 0.4s ease;
transition: all 0.4s ease;
z-index: 2;
clip: rect(0,650px,434px,0);
}


a.nowandthen img:nth-of-type(2){
z-index: 1;
}


a.nowandthen:hover img:nth-of-type(1){
clip: rect(0,0,434px,0);
opacity: 0;
}

</style>

<a class="nowandthen" href="http://itviet360.com">
<img alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnA0U-RYl_8OGJ3XDmtQBXfPD53Qmz_Zz5kqtb_BDu_tKVy6EgVZ3Fgc085k_29lzX3N62KNGXvFbUhPea8loxlvzwimOGRtyhpanSmvXSz7SX8Tofbnj0sHn_OkQC77tTNiPBeH6oJx8/s1600/sunset-sunrise-btrix+(1).jpg" />
<img alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmuR2sn62SlFH__205kduxT4fGV2wvPpQ7NHzBYmcZwZ7aQ03NE35VDoKnw92CyddJJnh3vvfLLxBGXZX1-7sS8YxUlEtlwJ7dabzmUkd2qGKyX51dGZGGh4gEk5217xozqZZuLdjPjyQ/s1600/sunset-sunrise-btrix+(2).jpg" />
</a>

- Dán code đó vào vị trí các bạn cần thêm nhé/
Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

buttons=(Accept !) days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !