“位置:固定”当父旋转或平移时,div不固定 [英] "position: fixed" div is not fixed when parent rotates or translates
问题描述
A div
与position:fixed
嵌入父级 div
。当父旋转或平移时,子 div
也移动。
A div
with "position: fixed"
is embedded into a parent div
. When the parent rotates or translates, the child div
moves also.
这是错误吗?我预计孩子 div
将保持不变。
Is it a bug? I expected the child div
to remain fixed.
HTML片段:
<div id="mask">
<div id="page">
</div>
</div>
请参阅: http://jsfiddle.net/PseKK/
我知道我可以通过将反向变换应用到子 div
但是出于性能原因,在我的实际情况下,我正在寻找一个不涉及额外转换的解决方案。
I know that I can fix it by applying the reverse transformation to the child div
but for performance reasons in my real scenario, I am looking for a solution that doesn't involve extra-transformation.
如何克服?
推荐答案
这是一个转贴,答案位于这个原始问题
This is a repost, the answer is located in this original question
不幸的是,这是一个错误,但似乎有办法解决它。
Unfortunately it is a bug, but there seems to be a way to get around it.
这篇关于“位置:固定”当父旋转或平移时,div不固定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!