gpt4 book ai didi

jquery - 整页滚动到特定部分

转载 作者:搜寻专家 更新时间:2023-10-31 21:52:15 25 4
gpt4 key购买 nike

我有一个页眉、页脚和两个正文部分。我只想对我的视差容器进行整页滚动。我设法为视差设计了标记和样式,但脚本没有成功。


<div class="wrapper">
<div class="top-content">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
<div class="parallax">
<div class="parallax__screen">
<div class="parallax__image">
<div class="parallax__illustration" style="background-image: url('https://picsum.photos/id/1/200/300');"></div>
</div>
<div class="parallax__copy">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
</p>
</div>
</div>
<div class="parallax__screen">
<div class="parallax__image">
<div class="parallax__illustration" style="background-image: url('https://picsum.photos/id/22/200/300');"></div>
</div>
<div class="parallax__copy">
<p>
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
</p>
</div>
</div>
<div class="parallax__screen">
<div class="parallax__image">
<div class="parallax__illustration" style="background-image: url('https://picsum.photos/id/15/200/300');"></div>
</div>
<div class="parallax__copy">
<p>
it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged
</p>
</div>
</div>
<div class="parallax__screen">
<div class="parallax__image">
<div class="parallax__illustration" style="background-image: url('https://picsum.photos/id/10/200/300');"></div>
</div>
<div class="parallax__copy">
<p>
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
</p>
</div>
</div>
</div>
<div class="bottom-content">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
</div>

如有任何帮助,我们将不胜感激。这是我的 fiddle

最佳答案

您是否想避开任何图书馆并自己动手做?无论哪种方式,我认为你不能只用 CSS 来完成,你需要一些 JS。

我推荐fullPage.JS ,真的很容易使用。

关于jquery - 整页滚动到特定部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56343996/

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