【发布时间】:2013-02-11 00:14:17
【问题描述】:
在我的页面上,我有一个具有以下 CSS 规则的元素:
.pointer {
position: fixed;
background-repeat: no-repeat;
background-position: center;
top: 70%;
z-index: 1;
width: 3%;
height: 6%;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
float: left;
left: 0;
background-image: url("img/myImage.jpg");
}
在我测试的浏览器中运行良好,只有 Opera 不喜欢它。当我滚动时,背景图像也会“滚动”并因此从容器中消失。
我相信这是一个已知问题,但我仍然无法找到解决方案。
在this page 上,描述了一种如何从 Opera 中隐藏 CSS 规则的方法,但除了这篇文章是 anno 2002 之外,我实际上不想使用 CSS hack。
删除overflow: hidden 并不能解决问题,添加background-attachment: fixed 也没有帮助。还有其他想法或解决方案吗?
【问题讨论】:
-
您能为我们创建一个演示吗? (见:jsfiddle.net)
-
@cimmanon 添加了一个小提琴。当然必须在opera中打开才能出现bug。
标签: css positioning background-image opera css-position