Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 没有水平滚动条的大背景图像_Css_Background_Position - Fatal编程技术网

Css 没有水平滚动条的大背景图像

Css 没有水平滚动条的大背景图像,css,background,position,Css,Background,Position,我想复制苹果大背景效果(Apple.com) 背景虽然比浏览器大,但不会显示水平滚动条,当我们使浏览器小于1024px时,背景会锁定在左侧,采用正常的1024px宽网站的正常行为,而在线解决方案只提供始终居中的背景。 有人知道怎么做吗?从CSS设置背景 下面的html设置背景,而不显示水平滚动条 html { background: url(images/bg.jpg) no-repeat center center fixed; background-size: cover; }

我想复制苹果大背景效果(Apple.com) 背景虽然比浏览器大,但不会显示水平滚动条,当我们使浏览器小于1024px时,背景会锁定在左侧,采用正常的1024px宽网站的正常行为,而在线解决方案只提供始终居中的背景。
有人知道怎么做吗?

从CSS设置背景

下面的html设置背景,而不显示水平滚动条

html { 
background: url(images/bg.jpg) no-repeat center center fixed;     
background-size: cover;
}

首先,这是我在我的问题中提到的一个例子,在这个例子中,背景始终是中心的。其次,我认为我要寻找的答案是基于容器中的容器,溢出。。。看看这个页面,背景图像居中,直到浏览器宽度小于1024px,然后它不再居中,它与网站的其余部分锁定在左侧。