gpt4 book ai didi

css - 背景位置固定

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

谁能告诉我这是为什么:

.s1{
background:url('../img/backgrounds/new/background1.jpg') no-repeat fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
min-height:100%;

}

在本地主机上工作,背景像固定位置一样留在原地,但是当我将它上传到服务器时它是静态的? :) 没有更多的代码可以显示,它只是一个 DIV

附言。它不是我清理它的缓存,它不是我使用的浏览器。

回答:

我明白了……backstretch 插件已打开,本地主机已关闭 :)

最佳答案

试试这个:/**

background:url('../img/backgrounds/new/background1.jpg');
background-size: cover;
min-height:100%;
background-attachment: fixed;
background-repeat: no-repeat;

**/

关于css - 背景位置固定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36064163/

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