Chrome position:fixed inside position:absolute breaking with iframe / video

匿名 (未验证) 提交于 2019-12-03 01:59:02

问题:

I've spent 2 hours on this crazy bug on one of my websites which has huge amount of content, until I figured what was causing the issue; On Chrome it appears that position:fixed element inside a position:absolute element (which has a z-index) would not work like a position:fixed element would.


Note - only on Chrome windows (not on ubuntu).
I want to post this question and my answer so others won't get frustrated from Chrome and it's crazy bugs. see demo:

TEST PAGE: http://jsbin.com/uhuzoy/2/edit

回答1:

FIX: add these rules to the position:fixed element:

-webkit-backface-visibility: hidden; -webkit-transform: translateZ(0); 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!