Chrome位置:固定内部位置:绝对打破iframe /视频
问题描述:
我花了2个小时在我的一个网站上的这个疯狂的bug,有大量的内容,直到我想出是什么导致的问题;在Chrome上, position:absolute 元素(具有z-index)中的 position:fixed 元素不会像 position:fixed strong>元素。
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.
请注意 - 仅在Chrome窗口(不是ubuntu)。
我想发布这个问题和我的答案,所以其他人不会从Chrome中受挫,这是疯狂的错误。请参阅演示:
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:
测试页: http:// jsbin。 com / uhuzoy / 2 / edit
TEST PAGE: http://jsbin.com/uhuzoy/2/edit
答
这些规则到位置:fixed
元素:
-webkit-backface-visibility: hidden;
-webkit-transform: translateZ(0);