CSS变换:translate move postion:fixed inner [英] CSS transform: translate moves postion:fixed inner Div

查看:180
本文介绍了CSS变换:translate move postion:fixed inner的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下示例显示了div中的div。内部div是

The following example shows a div inside a div. The inner div is

position: fixed;

当我添加

transform: translate(0px, 0px);

到外部div,内部div将不再像固定

to the outer div, the inner div will no longer behave as fixed

链接到示例: http://dabblet.com/gist/1723937

那么,translate是否真的改变了视口?

So, does translate actually change the viewport? Can anyone help me to keep the inner div fixed using css, when the outer div has a translate style?

谢谢你,
Felix

Thank you, Felix

推荐答案

这是一篇文章:

http://meyerweb.com/eric/thoughts/2011/09/12/un -fixing-fixed-elements-with-css-transforms /

希望您觉得它有帮助。

这篇关于CSS变换:translate move postion:fixed inner的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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