gpt4 book ai didi

css - 使用 Stellar.js 移动背景图像

转载 作者:太空宇宙 更新时间:2023-11-04 14:44:46 25 4
gpt4 key购买 nike

我正在使用 Stellar.js 开发垂直滚动网站。但是,当我开始滚动到其他页面时,我为第一张幻灯片设置的背景图像开始移动。我如何保持固定?网址:http://andrewgu12.kodingen.com/

截图(那个蓝色区域不应该有):

enter image description here

CSS:

div#home {
padding-top: 110px;
background:url(../images/home_background.jpg) no-repeat fixed;
max-height: 589px;
background-attachment:fixed;
}

任何帮助将不胜感激,谢谢!

最佳答案

虽然这会起作用,但它只会杀死所有滚动视差效果 - 要禁用视差背景并保留视差元素,请在顶部的变量声明区域下找到它并将其设置为“false”:

"parallaxBackgrounds: true,"--> parallaxBackgrounds: false,

关于css - 使用 Stellar.js 移动背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17979830/

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