Prodigy of Head | Add Captionss for Beauty Image Display | |
| Add Captionss for Beauty Image Display Posted: 28 Jan 2014 07:00 PM PST Tag <figure> merupakan salah satu new semantic elements dari HTML5. Lihat table informasi support mengenai hal ini caniuse.com/#feat=html5semantic Dengan menambahkan elemen figure pada tag gambar satu manfaat yang terasa yaitu mempermudah dalam memberikan tag <figcaption> Singkat penjelasan, dengan hadirnya 2 jenis elemen tersebut akan mempermudah kita dalam menghias tagging gambar plus keterangan singkat dari gambar yg dimaksud. Contoh: .embed, .embed-top, .overlay { Saya menghilangkan value figure dari kode sumber. Agar syntax tidak secara khusus untuk digunakan memakai tag figure (bisa juga dengan tag div)! display: inline-block; vertical-align: top; position: relative; margin: 0; font-size: .8em; background: white; overflow: hidden; } .embed img, .embed-top img, .overlay img { width: 100%; display: block; } .embed figcaption, .embed-top figcaption, .overlay figcaption { width: 100%; padding: .5em; color: rgba(50, 50, 50, 1.0); background: rgba(200, 200, 200, 0.825); } .embed *, .embed-top *, .overlay * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } .embed figcaption { position: absolute; bottom: 0; } .embed-top figcaption { position: absolute; top: 0; } .overlay figcaption { width: 100%; height: 100%; position: absolute; top: 0; opacity: 0; } .overlay:hover figcaption { opacity: 1; } .light figcaption { color: rgba(80, 80, 80, 1.0); background: rgba(245, 245, 245, 0.825); } .dark figcaption { color: rgba(245, 245, 245, 1.0); background: rgba(50, 50, 50, 0.7); } .medium { font-size: 1.0em; } .large { font-size: 1.2em; } .xlarge { font-size: 1.5em; } .hide figcaption { opacity: 1; } .hide:hover figcaption { opacity: 0; } .hide-smooth figcaption { opacity: 1; -webkit-transition: opacity .5s; -moz-transition: opacity .5s; -o-transition: opacity .5s; transition: opacity .5s; } .hide-smooth:hover figcaption { opacity: 0; -webkit-transition: opacity .5s; -moz-transition: opacity .5s; -o-transition: opacity .5s; transition: opacity .5s; } .reveal figcaption { opacity: 0; } .reveal:hover figcaption { opacity: 1; } .reveal-smooth figcaption { opacity: 0; -webkit-transition: opacity .5s; -moz-transition: opacity .5s; -o-transition: opacity .5s; transition: opacity .5s; } .reveal-smooth:hover figcaption { opacity: 1; -webkit-transition: opacity .5s; -moz-transition: opacity .5s; -o-transition: opacity .5s; transition: opacity .5s; } Penulisan markup <figure Ada 3 jenis style <figure class=". . ."> yg bisa kalian pakai: embed, embed-top and overlay.Full Feature Listing
Happy figure \m/ |
| You are subscribed to email updates from Tutorial Blog for Stylish Blogger To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
| Google Inc., 20 West Kinzie, Chicago IL USA 60610 | |