Problem: Glass Tooltip on Hover
Problem description
Given an HTML structure with a trigger element and an associated tooltip container, write CSS so that:
The tooltip is hidden by default and becomes visible when the user hovers over the trigger.
It uses a semi-transparent background (
rgbawhite,0.2),backdrop-filter: blur(6px), rounded corners, padding, and a lightbox-shadow.
Goal
Write CSS to implement a glassmorphic tooltip using only CSS, ensuring it appears on hover, is positioned properly, and remains legible.
Constraints
Use only CSS (no JavaScript).
Tooltip should use
position: absoluterelative to a positioned parent.Use the
:hoverselector on the trigger to toggle visibility.Background should be
rgba(255, 255, 255, 0.2)withbackdrop-filter: blur(6px).
Sample visual output
Here’s what the output would look like:
Good luck trying the problem! If you’re unsure how to proceed, check the Solution.
Problem: Glass Tooltip on Hover
Problem description
Given an HTML structure with a trigger element and an associated tooltip container, write CSS so that:
The tooltip is hidden by default and becomes visible when the user hovers over the trigger.
It uses a semi-transparent background (
rgbawhite,0.2),backdrop-filter: blur(6px), rounded corners, padding, and a lightbox-shadow.
Goal
Write CSS to implement a glassmorphic tooltip using only CSS, ensuring it appears on hover, is positioned properly, and remains legible.
Constraints
Use only CSS (no JavaScript).
Tooltip should use
position: absoluterelative to a positioned parent.Use the
:hoverselector on the trigger to toggle visibility.Background should be
rgba(255, 255, 255, 0.2)withbackdrop-filter: blur(6px).
Sample visual output
Here’s what the output would look like:
Good luck trying the problem! If you’re unsure how to proceed, check the Solution.