Cara membuat Popup Image ketia mouse hover image


CSS Popup Image dapat menampilkan link atau thumbnail gambar dan apabila gambar atau Link tersebut di house hover maka akan menampilkan gambar lain secara Popup dalam ukuran yang berbeda. Gambar akan diperbesar dengan menggunakan kode CSS.Untuk lebih jelasnya perhatikan code dibawah ini, ingat dirubah URL nya

 

<style type=”text/css”>

.thumbnail{
position: relative;
z-index: 0;
}

.thumbnail:hover{
background-color: transparent;
z-index: 50;
}

.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: lightyellow;
padding: 5px;
left: -1000px;
border: 1px dashed gray;
visibility: hidden;
color: black;
text-decoration: none;
}

.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}

.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: 0;
left: 60px; /*position where enlarged image should offset horizontally */

}

</style>

Contoh Tumbnails CSS Popup Image Viewer
<a href=”#thumb”><img src=”http://i1206.photobucket.com/albums/bb455/binkbenk/IMG_0572.jpg&#8221; width=”100px” height=”66px” border=”0″ /><span><img src=”http://i1206.photobucket.com/albums/bb455/binkbenk/IMG_0572.jpg&#8221; /><br />Abel</span></a>

<a href=”#thumb”><img src=”http://i1206.photobucket.com/albums/bb455/binkbenk/IMG_0578.jpg&#8221; width=”100px” height=”66px” border=”0″ /><span><img src=”http://i1206.photobucket.com/albums/bb455/binkbenk/IMG_0578.jpg&#8221; /><br />Abel & friend</span></a>

Contoh Link CSS Popup Image Viewer
<a href=”#thumb”>Abel<span><img src=”http://i1206.photobucket.com/albums/bb455/binkbenk/IMG_0572.jpg&#8221; /><br />Abel</span></a><br />

<a href=”#thumb”>Abel & friend<span><img src=”http://i1206.photobucket.com/albums/bb455/binkbenk/IMG_0578.jpg&#8221; /><br />Abel & friend</span></a>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s