Fixed Element Disappears in Chrome: A Documented Issue
The issue you encounter where fixed elements vanish during scrolling is an acknowledged problem in Chrome. It particularly affects elements with top: 0;. Attempting to remedy this by modifying z-index or visibility has proven fruitless.
Solution: -webkit-transform: translateZ(0)
The solution for this perplexing behavior lies in employing the -webkit-transform: translateZ(0) property to the position: fixed element. This simple yet effective step coerces Chrome to leverage hardware acceleration, ensuring continuous repainting of the fixed element.
Reporting the Issue
This issue has been reported to the Chromium team and assigned as bug https://bugs.chromium.org/p/chromium/issues/detail?id=288747. Please consider adding a star to this bug to demonstrate its significance and encourage its resolution.
The above is the detailed content of Why Do Fixed Elements Disappear in Chrome While Scrolling?. For more information, please follow other related articles on the PHP Chinese website!