CSS tooltips provide a way to display additional information when a user hovers over an element. Tooltips are typically used to offer more context or guidance to users.
This example demonstrates a basic tooltip:
<div class="tooltip">
Hover over me
<span class="tooltiptext">Tooltip text</span>
</div>
This example demonstrates a tooltip with an arrow:
<div class="tooltip tooltip-arrow">
Hover over me
<span class="tooltiptext">Tooltip with arrow</span>
</div>
This example demonstrates a tooltip positioned on top:
<div class="tooltip tooltip-top">
Hover over me
<span class="tooltiptext">Tooltip on top</span>
</div>
This example demonstrates a tooltip positioned on the bottom:
<div class="tooltip tooltip-bottom">
Hover over me
<span class="tooltiptext">Tooltip on bottom</span>
</div>
This example demonstrates a tooltip positioned on the left:
<div class="tooltip tooltip-left">
Hover over me
<span class="tooltiptext">Tooltip on left</span>
</div>
This example demonstrates a tooltip positioned on the right:
<div class="tooltip tooltip-right">
Hover over me
<span class="tooltiptext">Tooltip on right</span>
</div>