Tooltips are a great way to display information about a link before to user proceeds to the destination.
I make the tooltip position bottom. Hope you guys like it.
live demo:
CSS code:
a.tooltips {
position: relative;
display: inline;
}
a.tooltips span {
position: absolute;
width:140px;
color: #FFFFFF;
background: #000000;
height: 36px;
line-height: 36px;
text-align: center;
visibility: hidden;
border-radius: 21px;
}
a.tooltips span:after {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -8px;
width: 0; height: 0;
border-bottom: 8px solid #000000;
border-right: 8px solid transparent;
border-left: 8px solid transparent;
}
a:hover.tooltips span {
visibility: visible;
opacity: 1;
top: 30px;
left: 50%;
margin-left: -76px;
z-index: 999;
}
HTML code:
<a class="tooltips" href="#">CSS Tooltips
<span>Tooltip</span></a>
May be useful!
0 Comments:
Posting Komentar