滚动条内的滚动条仅使内部滚动条跳转到 id
我有一个需要滚动条的页面 -
http://www .aus-media.com/dev/site_BYJ/schedule-pricing/pricing.html
您会注意到(除非您在大屏幕上以高分辨率运行),主页有一个外部滚动条,如下所示以及内容的内部滚动条。当您单击其中一个子项目(例如付款)时,您会注意到外部页面以及内部滚动条都向下滚动。
有谁知道一种只滚动内部滚动条的方法,这样它就只能跳转到 id 吗?
谢谢大家 尼克
I have a page that requires a scrollbar -
http://www.aus-media.com/dev/site_BYJ/schedule-pricing/pricing.html
You will notice (unless you are running at a high resolution with a big screen) that there is an outer scrollbar for the main page as well as an inner scrollbar for the content. When you click on one of the sub items e.g. payments you will notice that the outer page scrolls down as well as the inner scrollbar.
Does anybody know of a way to only scroll the inner scrollbar, so only it jumps to the id?
Thanks guys
Nik
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
浏览器尝试向上滚动直到目标位于顶部,为此,两个滚动条都需要滚动。
您应该使用 javascript 仅滚动内部滚动条。
browser try to scroll up until target is on top, to achieve this, both scrollbars need to scroll.
You should use javascript to scroll only inner scrollbar.