我为我妹妹的生日为一家假公司创建了一个网站,并且我在修复背景时遇到了一些麻烦。我知道这应该是简单的,只是一个附件的问题:固定的,但似乎没有工作的原因。那么其原因显然是我,但我想你能帮助我解决这个:)修正了顶部导航栏和滚动的背景
这里是网站:http://camilleperrin.fr/BBE/,当你需要滚动(此页上,如果你有一个1920x1080分辨率显示的问题:http://camilleperrin.fr/BBE/index.php?page=careers )。如果你有一个巨大的屏幕,你不能看到问题,背景图片不会留在它应该的地方,并随着滚动下去。
这里是我的代码(我被互联网的帮助下,我没有想出这一切我自己):
CSS:
body{
background:url('background.jpg') no-repeat center 160px fixed;
}
#overallcontainer{
padding: 70px 90px 120px 90px;
}
#blurcontainer {
position: relative;
}
#blurbg{
background:url('background.jpg') no-repeat center 160px fixed;
text-align:center;
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
z-index: 99;
width:800px;
margin:0 auto;
padding:60px;
-webkit-filter: blur(5px);
}
#textContainer {
position: relative;
z-index: 100;
background: rgba(0,0,0,0.65);
margin:0 auto;
color:#dde;
width:800px;
padding:60px;
text-align:justify;
}
HTML:
<div id="overallcontainer">
<div id="blurcontainer">
<div id="blurbg"></div>
<div id="textContainer">
blah blah blah
</div>
</div>
</div>
如果您对我如何解决这个问题有所了解,同时保留我的模糊文本容器,这将是真正的帮助湖
谢谢!
Camile
你可以指定你的环境,因为一切都在我的安装的浏览器(PC与Firefox,IE和歌剧工作正常)? – scraaappy
@silviagreen,两个背景都固定在我共享的代码版本上。我只是用阿齐兹的答案更新了页面,所以现在两张图片都不匹配了。 –
@scraaappy,我在PC,Windows 7,Chrome上,但是我尝试过使用Firefox,并且遇到了同样的问题:当您滚动时,背景上出现白色条纹(再次,我已更新了该建议阿齐兹,所以它现在看起来不是这样:)) –