如何动画切换到HTML中的不同部分?
我最近开始为我的网站使用部分,但我讨厌它只是如何将您带到您设置的部分。我在一些网站上看到,当您按下一个按钮将您带到另一个部分时,它会滑下来真正光滑。我一直在Google上搜索,但没有找到我需要的东西。甚至检查了检查元素上的代码,但没有找到与我需要的相关的任何内容。
<p><a href="#haid">
I recently started using sections for my website but I hate how it just immidiately just takes you to the section you've set it to go. I've seen on some websites that when you press a button to take you to another section, it slides down going down really smooth. I've been searching on google but didn't find what I need. Even checked the code on inspect element but yet didn't find anything related to what I need.
<p><a href="#haid">????</p>
<p id="haid" class="about text-black text-size-big">How am I doing?</p>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您要寻找的效果与CSS
CSS
来源中的滚动行为有关:
https://developer.mozilla.org.orgg/fr/docs/web/web/web/web/web/web/web/ CSS/卷轴行为
The effect you are looking for is related to scroll behavior in css
CSS
Source :
https://developer.mozilla.org/fr/docs/Web/CSS/scroll-behavior