使背景固定(固定)
答
在该网站上,这条线
<div><img src="images/bottom_bg.jpg" width="100%" alt="" /></div>
改变
<div id="foobar"><img src="images/bottom_bg.jpg" width="100%" alt="" /></div>
,并添加以下CSS:
<style>
#foobar{ position: fixed; bottom: 0px; width: 100%; }
</style>
这应该做的工作。
答
在CSS:
background-attachment: fixed
http://www.w3schools.com/css/tryit.asp?filename=trycss_background-attachment
答
body{
background-image:url('lake.jpg'); /* or whatever */
background-attachment:fixed;
}
答
尝试
background-attachment:fixed;
答
或者在速记:
body {background: url("/images/myimage.png") no-repeat fixed top left;}