使背景图像停在div行

时间:2013-07-07 10:05:00

标签: css

我使用此代码将背景图片插入到我的页面中。

<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

1 个答案:

答案 0 :(得分:0)

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