作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我使用这段代码在我的页面中插入了一张背景图片。
<style>
#bodypage
{
background-image:url('image');
background-repeat:no-repeat;
background-attachment:fixed;
background-position:bottom right;
}
</style>
但是,当滚动到页面底部时,图像被 div 截断
理想情况下,图像的底部应该停在该行(这是一个新的 div)上,而不是在它下面滚动。
我怎样才能做到这一点?
进一步说明
我希望该图像保持停在该行上,不会被切断,而不是让该行将其切断,如此处所示。
最佳答案
试一试 background: #000000 url(../path/to/images/img.jpg) no-repeat bottom 0;
关于css - 使背景图像停在 div 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17511134/
我是一名优秀的程序员,十分优秀!