由于某些原因,如果我加载一个html页面,其位置:固定在某物上,但我加载到一个iframe,固定的位置似乎不渲染固定,但看起来更像绝对定位。
我不希望固定的div相对于父文档是固定的。我只是认为他们将固定在iframe。
解决方案Chrome不存在修复 position:fixed if:
a)在元素中使用CSS3 transform, >
b)您有一个子元素位于其父元素的框外
奇怪的是, ,但仍然开放: code.google/p/chromium/issues / detail?id = 20574
For some reason, if I load an html page that has position:fixed on something, but I load it in an iframe, the fixed positions to not seem to render as fixed, but look more like absolute positioning.
I'm not expecting the fixed divs to be fixed relative to the parent document. I would just think that they would be fixed in the iframe. Is this not possible in an iframe?
解决方案Chrome has a bug that doesn't fix elements with position:fixed if:
a) you use CSS3 transform in any element, and/or
b) you have a child element positioned outside the box of it's parent element
Oddly enough, the bug was reported back in 2009 and it's still open: code.google/p/chromium/issues/detail?id=20574
更多推荐
position:固定在iframe里面
发布评论