如何添加超文本链接滚动到新页面上的特定点? [英] How to add a Hypertext link with scrolling to a specific point on that new page?
本文介绍了如何添加超文本链接滚动到新页面上的特定点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的HTML页面上添加了一个按钮,当点击它时,我得到一个新的URL(这就像一个超文本链接按钮的背后),想知道我该怎么做,
I added a button on my HTML-Page, when clicking on it i get to a new URL (It's like a Hypertext Link "behind" the button) and wanted to know how could I make it so, that the new opened page, will be scrolled down to a specific point on that page and not on the top?
推荐答案
我想这将会工作。
<a href="www.yoursite.com/newpage.html#id">Link</a>
其中ID是要滚动到的元素的ID。
Where ID is the ID of the element you want to scroll to.
这篇关于如何添加超文本链接滚动到新页面上的特定点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文