gpt4 book ai didi

javascript - Stellar.js 背景附件设置为固定但疯狂的抖动仍在发生

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:34:32 26 4
gpt4 key购买 nike

如标题所示,我正在使用 Stellar.js。我只有一个视差元件,而且非常简单。这是一个带有背景图片的部分。背景图像设置为固定(如文档所述,以避免抖动),但图像仍然抖动——在 Chrome 中有点,在其他浏览器中非常糟糕。当我删除固定的 CSS 时它也没有改变。

这是元素:

<!--Testimonial Section-->
<section id="testimonial" data-stellar-background-ratio="0.5" data-stellar-vertical-offset="-900">
<div class="container">
<div class="row">
<div class="span3 margin-30">
<img src="img/testimonial-img.png" alt="Title">
</div>

<div class="span9">
<h2>“Lava has been an asset to our company by providing us with a cutting edge look and a web presence that shows off our work and skills.”</h2>
<div class="testimonial-source pull-right">Jeff | Ceo - Creative Company</div>
</div>
</div>
</div>
</section>

这是 CSS:

#testimonial {
background: url(../img/studio-10.jpg) no-repeat center;
background-size: 2000px 2000px;
background-attachment: fixed;
padding-top: 120px;
padding-bottom: 120px;
}

非常简单。有什么建议吗?

最佳答案

问题最终成为与视差滚动中涉及的背景图像位于同一 div 中的图像标签。删除此图像后,抖动停止。

关于javascript - Stellar.js 背景附件设置为固定但疯狂的抖动仍在发生,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17375411/

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