Prev Demo
CSS3
>
Tooltip
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title></title> <style> .tooltip { position: relative; display: inline-block; border-bottom: 2px solid green; } .tooltip .tooltiptext { visibility: hidden; width: 200px; background-color: black; color: yellow; text-align: center; border-radius: 20px; padding: 5px 0; position:fixed; z-index: 1; border-color:green; } .tooltip:hover .tooltiptext { visibility: visible; } </style> </head> <body style="text-align:left;"> <p>Place mouse on the button to get tooltip</p> <div class="tooltip"><button type="button" style="background-color:red;color:white;">Hover over me</button> <span class="tooltiptext">Tooltip text</span> </div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output