I have been using the overflow: overlay CSS property to display a scrollbar only when hovering over a element in Chrome. This technique has been working fine until recently, but suddenly the overlay effect is no longer working. Instead, the normal scrollbar is displayed, taking up space and causing the content to shake when hovered over.
I'm wondering if anyone else has experienced this issue and if there have been any changes in the latest version of Chrome that might have removed support for overlay scrollbars. Any insights or suggestions on how to resolve this would be greatly appreciated.
<div class="content">content</div>
<style>
.content {
overflow: hidden;
}
.content:hover {
overflow: overlay;
}
</style>
Note: I am using the latest version of Chrome.
Expected: When hovering over the element, an overlay scrollbar should appear without affecting the layout of the content.
Actual: The overlay effect is not working, and the normal scrollbar is displayed, causing the content to shake when hovered over.
Thank you in advance for your help!