Design a tooltip with an arrow that dynamically changes position based on hover location.
HardProblem Statement
Design a tooltip with an arrow that dynamically changes position based on hover location.
Sample Output
The tooltip appears above, below, left, or right of the button based on the hover position.
Limits
Time: 2s · Memory: 256 MB
Code Editor
00:00
<!DOCTYPE html>
<html>
<head>
<style>
/* Add CSS here to style the dynamic tooltip */
</style>
</head>
<body>
<div class="tooltip-container">
<button class="tooltip-button">Hover Me</button>
<div class="tooltip">Tooltip Text</div>
</div>
</body>
</html>
Expected Output
The tooltip appears above, below, left, or right of the button based on the hover position.