Chrome位置:固定内部位置:绝对打破iframe /视频 [英] Chrome position:fixed inside position:absolute breaking with iframe / video

查看:141
本文介绍了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);

这篇关于Chrome位置:固定内部位置:绝对打破iframe /视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆