gpt4 book ai didi

html - 响应式背景图片在移动设备尺寸下无法填满整个页面长度

转载 作者:行者123 更新时间:2023-11-28 02:24:22 24 4
gpt4 key购买 nike

我正在构建一个具有固定背景和滚动内容的网站:www.grandcollapse.com

图像完全固定,您可以很好地向下滚动,但在移动级别,图像似乎只占据了视口(viewport)的上部。我正在使用的背景代码在这里(css):

正文{

background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%,rgba(0,0,0,0.6) 100%), url(img/background.png) fixed;

background-repeat: no-repeat;

background-position: center fixed;

有什么建议吗?

最佳答案

你的 div 容器挡住了背景,给它添加边距修复它,你需要使用媒体查询来应用移动尺寸

关于html - 响应式背景图片在移动设备尺寸下无法填满整个页面长度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48027926/

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