背景位置的CSS奇怪行为

时间:2014-02-24 02:37:15

标签: css background-position

我有这个CSS在div中显示水印:

background-image: url("../Images/Watermark02.png") !important;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: right bottom;

行为如下图所示,有人可以帮我并告诉我缺少什么让它像Chrome一样在Chrome上运行?

enter image description here

1 个答案:

答案 0 :(得分:2)

您可以通过删除背景附件:已修复来解决此问题。 “固定”值是相对于屏幕的,而不是你有里面的背景图像。虽然这可能是由于其他原因造成的,但我需要查看其余的CSS / HTML。

background-attachment: fixed; /* Remove this */

我在这里为你设置了一个jsfiddle:http://jsfiddle.net/HkBh4/