gpt4 book ai didi

css - 使背景图像停在 div 行

转载 作者:行者123 更新时间:2023-11-28 12:43:55 25 4
gpt4 key购买 nike

我使用这段代码在我的页面中插入了一张背景图片。

<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

最佳答案

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

关于css - 使背景图像停在 div 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17511134/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com