1
I want the tooltip
appear as soon as you load the page, other than by the effect of hover
.
[class*="tooltip"]{
position:relative;
text-decoration:none;
}
[class*="tooltip"]:after,[class*="tooltip"]:before{
position:absolute;
z-index:100;
opacity:0;
}
[class*="tooltip"]:after{
box-shadow:0 0 5px 0 rgba(0,0,0,0.3);
content:attr(aria-label);
height:25px;
line-height:25px;
padding:0 10px;
font-size:1.2rem;
text-align:center;
color:#fff;
background:#222;
border-radius:4px;
text-shadow:0 0 5px #000;
white-space:nowrap
}
[class*="tooltip"]:before{
content:'';
width:0;
height:0;
border-width:6px;
border-style:solid
}
[class*="tooltip"]:hover:after,[class*="tooltip"]:focus:after,[class*="tooltip"]:hover:before,[class*="tooltip"]:focus:before{
opacity:1
}
/* tooltip-top */
.tooltip-top:after,.tooltip-top:before{
transition:bottom .25s ease-in-out;
bottom:90%;
left:-9999px;
margin-bottom:12px
}
.tooltip-top:before{
border-color:#222 transparent transparent transparent;
margin-bottom:0
}
.tooltip-top:hover:after,.tooltip-top:focus:after,.tooltip-top:hover:before,.tooltip-top:focus:before{
bottom:85%;
left:0;
}
.tooltip-top:hover:before,.tooltip-top:focus:before{
left:15px
}
<a href="#component-tooltip" role="tooltip" class="tooltip-top btn" aria-label="Explore inadimplência por empreeendimentos">Top</a>
The effect of Hover is given by the selector
:hover
. Try to remove it or replace it in your code.– Woss
it worked! I think now I can set in the tooltip-top class after about 5 seconds it disappear using setTimeout, right? http://jsfiddle.net/aq9Laaew/303453/
– tatah
Tatah doesn’t need this, makes a @keyframes and a fadeOut animation with delay of 5s in the animation... If you want I can post this option as response
– hugocsl
@hugocsl I accept the option, to help me
– tatah