我想从一个页面平滑滚动到另一个页面 [英] I want to scroll smooth from one page to other

查看:77
本文介绍了我想从一个页面平滑滚动到另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,EveryBody !!我想要一个效果我想要做的就是当我点击菜单的链接说...或者联系我们我想要一个网页顺利滚动联系我们或关于我们特定div的形式。我不想向用户显示横幅图像,我希望用户看到滚动的效果。所有

请记住我在同一页面上顺利滚动,但是当用户点击网站菜单的锚点链接时,我想平滑滚动到另一页面的div ...



我尝试了什么:



我这样做是为了转到另一页的特定div但我想要的是在另一页上平滑滚动的效果

我所做的事情是

Hello, EveryBody!! I want an effect all I want to do is when I click on the link of the menu say about ... or contact us I want a web page to smoothly scroll to contact us or about us form of specific div. I don't want to show the banner image to the user I want the user to see the effect of scrolling. that all
Remember I have scroll smoothly in same page but i want to smooth scroll to div of another page when user click on anchor link of the menu of the website ...

What I have tried:

I have done this to go to specific div of another page yet I want is the effect of a smooth scroll on another page
Things I have done is

<li><a href="Contactus.html#info">Contact Us</a></li>



谢谢


thank you

推荐答案

如果内容已经在页面中作为一部分隐藏的
If the content is already inside the page as part of a hidden
标签,您可以使用JS使其可见,并在将旧页面滚出视图时将其滚动到视图中。
tag, you can use JS to make it visible and scroll it into view while scrolling the old page out of view.


这篇关于我想从一个页面平滑滚动到另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆