filmov
tv
CSS Exercise: Simple Tooltip Using attr()

Показать описание
In this exercise we use the tooltip class to specify which element is going to be the tooltip. You can style this however you like, but for this example we use a dotted border-bottom.
Next, create a :before pseudo-element that will contain a content attr() function and its specification. In this case, we call it tooltip-data.
Lastly, we create a :hover pseudo-class that will set the opacity to 1 whenever someone hovers over the tooltip itself. #shorts #css #coding
📸 Photos by Unsplash & Envato Elements, Videos via Pixabay & Envato Elements, GIFs by Tenor
Next, create a :before pseudo-element that will contain a content attr() function and its specification. In this case, we call it tooltip-data.
Lastly, we create a :hover pseudo-class that will set the opacity to 1 whenever someone hovers over the tooltip itself. #shorts #css #coding
📸 Photos by Unsplash & Envato Elements, Videos via Pixabay & Envato Elements, GIFs by Tenor