How to create tooltip with CSS without javascript
It's simply, i just put a pseudo :after to a link element.- Open and login to blogger.com, select your blog
- Click template tab in left sidebar, then backup your template
- Edit HTML proceed, then search (CTRL+F) for this code: ]]></b:skin>
- If you have found that code, before that code, paste this code:
a.tltp{position: relative;}a.tltp:after{content:attr(alt);display:none;margin-left:10px;color:#000;background: #fff;border:1px solid #ccc; border-radius: 3px;padding:3px;width:300px;position:absolute;font-family:'Arial',sans-serif;line-height:1.5;letter-spacing:1px;text-transform: lowercase;font-weight: normal;font-size:13px;font-variant:normal;text-align: justify; font-style:normal;}/*CSS tooltip by Damar Zaky http://damzaky.blogspot.com*/a.tltp:hover:after{display:inline;} - Then save template
How to make the link with tooltip
For make a tooltip, in any link just put class='tltp' and alt='THE CONTENT OF TOOLTIP' or like this:
<a href='http://blablablac.com' class='tltp' alt='THE CONTENT OF TOOLTIP'>Link</a>
Demo
LinkJust that!
Tiada ulasan:
Catat Ulasan