Since April 2024, Popover API works major browsers on their latest versions. This API allows developers to display popover content on top of other page content.
Code
For this small snippet, I've used JS Popover API (HTMLElement.showPopover
& HTMLElement.hidePopover
) and Floating UI for Tooltip positioning. Check it out: