Cara Membuat Teks Animasi Muncul Pada Saat Gambar Disorot oleh Mouse
Silahlkan copy paste kode CSS dan HTML berikut ke halaman atau pada HTML blog maupun web.
<style type='text/css'>Keterangan
#bt_imageeffect {
margin: 20px auto;
width: 100%;min-height: 300px; padding: 20px 0;
text-align: center;
}
.galleryItem {
display: inline-block;;
position: relative;
width: 250px; height: 250px;
padding: 0;margin: 0 20px;
border: solid 10px #fff;
-webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);
}
.galleryItem img {
width: 250px;height: 250px;
}
.caption {
position: relative;
display: inline-block;
width: 250px; height: 250px;
z-index: 10;
}
.caption::before {
content: attr(data-title);
position: absolute;top: 0; left: 0;
width: 250px; height: 0;
font-family: 'Roboto', Roboto;
font-size: 1.8em;font-weight: 600;
line-height: 1.4em;color: #086FA1;
background: #fff;
overflow: hidden;
-webkit-transition: all 0.9s ease;
-moz-transition: all 0.9s ease;
-ms-transition: all 0.9s ease;
-o-transition: all 0.9s ease;
transition: all 0.9s ease;
}
.caption::after {
content: attr(data-description);
position: absolute;
bottom: -0;left: 0;
width: 250px;height: 0;
font-family: 'Roboto', Roboto;
font-size: 1.1em;
font-weight: 400;
line-height: 1.4em;color: #fff;
background: #222;
overflow: hidden;
-webkit-transition: all 0.9s ease;
-moz-transition: all 0.9s ease;
-ms-transition: all 0.9s ease;
-o-transition: all 0.9s ease;
transition: all 0.9s ease;
}
.caption:hover::before {
height: 125px;
}
.caption:hover::after {
bottom: 0;height: 125px;
}
</style>
<div id="bt_imageeffect">
<li class="galleryItem">
<a class="caption" data-description="Claritas est etiam processus dynamicus, qui sequitur mutationem
consuetudium lectorum." data-title="Nature Scene" href="Link Disini Jika Di inginkan">
<img alt="Nature Scene" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqMHiBZYAn8O_f9qFisBYm4WiCOcAwVMB7TayGNFfOL9B3WVQ0pBZlsfrwMHmhrXiaTUJubhVgfTFeRGMFglnjTu67Yt985tivV62KXsezIO4pZoocFmbsL10xN2uA-O5TrBf9kja9Nu_9/s1600/4.jpg"/>
</a></li>
<li class="galleryItem">
<a class="caption" data-description="Claritas est etiam processus dynamicus, qui sequitur mutationem
consuetudium lectorum." data-title="SunFlower" href="Link Disini Jika Di inginkan">
<img alt="Sunflower" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS31DyXfJsnmum-She1Clacjim7gRMNM4cC65XA4dJyMAr4GNCpPWLNpQ2VG-LzxOskMg3q8yTppb-5marJOdRA46Wfkzy_i2q8ukdVEvykhhfq0PnKJe_Mw6LezISSY1kONjtaQBji_qw/s1600/14.JPG" />
</a></li>
<li class="galleryItem">
<a class="caption" data-description="Claritas est etiam processus dynamicus, qui sequitur mutationem
consuetudium lectorum." data-title="Nature Scene" href="Link Disini Jika Di inginkan">
<img alt="Nature Scene" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKpaRvVwPOIN5gmWbLO1CqLyTkIcY0nQuDG69cQuLRf9hCzjZmy9XDhPMz22QDyLVDyqYkK9glzrLZGZjiWjIDN_cS2Ln_MFS0HJ13jUyapIC4rJIIeOFi-IE0QpK-oC7kqyHtaoHQ28U3/s1600/2.JPG"/>
</a></li>
<li class="galleryItem">
<a class="caption" data-description="Claritas est etiam processus dynamicus, qui sequitur mutationem
consuetudium lectorum." data-title="SunFlower" href="Link Disini Jika Di inginkan">
<img alt="Sunflower" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigQKJuL6Pwhv4MQx95Tw-SPCFbnEDytv9nwltqUHuGxqRKgJ83THaJQ1ZIpPThQkoVLbkEJocf0g9ZJjx3q8RllFdloJFnVI9TJDHtcJcTIbzfXvMXawNY6rkfsQM34dIOseqFYl5TbJ7K/s1600/PINK1.jpg" />
</a></li>
</div>
Ungu : Teks keterangan gambar
Orange : Link pada saat gambar di klik
Merah : URL Gambar yang ingin di pajang
Ditulis Oleh : Robby Armansyah

URL laman ini.
1 comments:
menambah wawasan sekali infonya
Show Konversi KodeHide Konversi KodeShow EmoticonHide Emoticon