【发布时间】:2014-02-25 01:52:57
【问题描述】:
我正在尝试使用 2 张图片创建磨砂玻璃效果,一张是页面背景,一张是看起来像磨砂的背景。为此,我使用以下代码:
body {
background: url(interferentie.png) no-repeat center center fixed;
background-size: cover;
}
#centerlogo {
width:600px;
height:200px;
background:url(interferentie_lensblur.png) center center fixed;
background-size:cover;
top:50%;
left:50%;
margin-left:-300px;
margin-top:-100px;
position:absolute;
}
在 Firefox 中,这可以正常工作。但在 chrome 中,div 的背景不会居中。您可以在此处查看示例:http://www.wavelengthfestival.nl。
在 chrome 中,似乎 div 的背景只是从 div 开始的地方开始。有人知道这个问题的解决方案吗?
【问题讨论】:
-
你能说得更具体一些吗?它看起来对我来说很重要。也许截图会有所帮助
-
对我来说看起来不错。 Ubuntu 上的 Chrome 34
-
在 windows chrome 32 上也很好看
-
s4.postimg.org/f2wa717ct/screen.png 这是我看到的截图。包含波长标志的中心 div 应与背景匹配。在 Firefox 中看起来不错:s4.postimg.org/p1h8tigsd/correct.png
标签: css google-chrome html background center