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
Log in to submit00:00
Try your code in this preview. Submit marks it done.
<!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>
Document
To view the HTML changes, please type the code within the editor