我有这个 CSS 在 div 中显示水印:
background-image: url("../Images/Watermark02.png") !important;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: right bottom;
行为如下图所示,有人可以帮助我并告诉我让它像 FF 一样在 Chrome 上运行缺少什么吗?
最佳答案
您可以通过删除 background-attachment: fixed 来解决这个问题。 “固定”值是相对于屏幕的,而不是你在里面有背景图像。当然,这可能是由于其他原因造成的,但我需要查看您的其余 CSS/HTML。
background-attachment: fixed; /* Remove this */
我在这里为您设置了一个 jsfiddle:http://jsfiddle.net/HkBh4/
关于背景位置的 CSS 奇怪行为,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21977946/