8,960
edits
No edit summary |
No edit summary |
||
| Line 4: | Line 4: | ||
transition: text-decoration 0.3s ease-in-out; | transition: text-decoration 0.3s ease-in-out; | ||
cursor: pointer; /* Change the cursor to indicate clickable text */ | cursor: pointer; /* Change the cursor to indicate clickable text */ | ||
outline: none; /* Remove the outline when focused */ | |||
} | } | ||
.underline-hover:hover { | .underline-hover:hover, | ||
.underline-hover:focus { | |||
text-decoration: underline; | text-decoration: underline; | ||
} | } | ||
| Line 32: | Line 34: | ||
} | } | ||
/* Show the tooltip text when the | /* Show the tooltip text when the span is focused */ | ||
.underline-hover .tooltip-text | .underline-hover:focus .tooltip-text { | ||
visibility: visible; | visibility: visible; | ||
opacity: 1; | opacity: 1; | ||
} | } | ||
/* Keep the tooltip visible if the tooltip itself is focused */ | |||
.underline-hover .tooltip-text:focus { | |||
visibility: visible; | |||
opacity: 1; | |||
} | |||