2013-07-07 53 views
0

我有一个背景图片插入我的网页,使用此代码。使背景图像停止在div行

<style> 
#bodypage 
{ 
background-image:url('image'); 
background-repeat:no-repeat; 
background-attachment:fixed; 
background-position:bottom right; 
} 
</style> 

然而,图像是由一个div切断,在滚动到页面底部

enter image description here

理想的情况下,图像的底部应在该行右边停下,(这是一个新的div),而不是在它下面滚动。

我该如何做到这一点?

为了进一步澄清

我想这种形象在线路保持停止,而不会中断,而不是让该行就砍下,如下图所示。

enter image description here

+0

那你尝试链接到?无论如何,它没有工作... – Guffa

+0

你尝试过'background-size:100%100%;'? – mohkhan

+0

mohkhan。 当我滚动到页面底部时,最终结果应该如下所示。 http://puu.sh/3x0fs.jpg 我能够通过滚动拍摄该照片。 我希望该图像能够保持停在线上,而不会被切断。 – user2487967

回答

0

尝试background: #000000 url(../path/to/images/img.jpg) no-repeat bottom 0;