已修复的位置不适用于变换CSS属性

时间:2014-04-09 16:00:33

标签: css css3 css-transforms

有没有办法保持"你好"元素固定?因此,当用户向上或向下滚动时,hello元素不会从其位置移动。

以下是示例:http://jsfiddle.net/VR5P8/

这是CSS:

#hello {
position: fixed;
border: 1px solid #000;
height: 100px;
width: 100px;
background-color: white;
}

以下是" Hello"的包装代码。元素:

-webkit-transform: translate(394px, 0px);

1 个答案:

答案 0 :(得分:6)

我相信这'transform3d' not working with position: fixed children解决了您的问题。从你的描述和你的小提琴来理解你想要实现的目标有点困难。