I have the following div on my html page:
<div class="tooltip">
<span>content</span>
</div>
And the following css script:
.tooltip span {
display:none;
}
.tooltip:hover span {
display:inline;
}
Is there a way to make the span stay visible for more 5 seconds after the mouse is out of the div? The reason I'm trying to do this is because this tooltip has some content inside it such as links.
PURE CSS
Sorry, I forgot.
Displaydoesn't get affected by transitions.Use
opacityinstead.Use transitions:
If you want it to fade out, use this:
UPDATE use
allif you have multiple properties. Note: you generally need have an initial property and a changed property. E.g. See JSFiddle (working)