Line 150: | Line 150: | ||
+ | /* Tooltip container */ | ||
.tooltip { | .tooltip { | ||
− | |||
− | |||
− | |||
− | |||
position: relative; | position: relative; | ||
display: inline-block; | display: inline-block; | ||
− | border-bottom: | + | border-bottom: 1px dotted black; /* If you want dots under the hoverable text */ |
− | + | ||
} | } | ||
− | .tooltiptext{ | + | /* Tooltip text */ |
+ | .tooltip .tooltiptext { | ||
visibility: hidden; | visibility: hidden; | ||
− | + | width: 120px; | |
− | width: | + | background-color: black; |
− | background-color: | + | |
color: #fff; | color: #fff; | ||
text-align: center; | text-align: center; | ||
− | + | padding: 5px 0; | |
− | + | ||
− | + | ||
border-radius: 6px; | border-radius: 6px; | ||
− | + | ||
+ | /* Position the tooltip text - see examples below! */ | ||
position: absolute; | position: absolute; | ||
z-index: 1; | z-index: 1; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
+ | /* Show the tooltip text when you mouse over the tooltip container */ | ||
.tooltip:hover .tooltiptext { | .tooltip:hover .tooltiptext { | ||
visibility: visible; | visibility: visible; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
Latest revision as of 09:21, 16 August 2017