平滑滚动 jquery 不起作用
我正在制作一个 1 页的网站。 当我单击导航链接“bas&harald”时,它应该顺利转到第二张幻灯片(右侧)。
但是我无法让它工作。我正在使用这个脚本: http://www.dezinerfolio.com/wp -content/uploads/smoothscrolldemo/df_smooth_scroll.html
我在这个js的底部实现了它文件:http://www.basenharald.nl/3d/script.js 我已经设置了“href”元素,“a name”元素也是如此。
谁能告诉我为什么这不起作用?另一个代码片段是否与此代码片段冲突? http://www.basenharald.nl/3d
提前致谢。
I am making a 1page website.
When i click the navigation link "bas&harald" it should go to the second slide (to the right) smoothly.
However i cannot get this to work. I am using this script: http://www.dezinerfolio.com/wp-content/uploads/smoothscrolldemo/df_smooth_scroll.html
I implemented it in the bottom of this js file:http://www.basenharald.nl/3d/script.js
I have set the "href" element, same goes for the "a name" element.
Can anyone tell me why this is not working? Is another codesnippet conflicting with this one?
http://www.basenharald.nl/3d
thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更新:假设代码几乎相同,但使用 scrollTo 插件:
这要求所有部分都有一个出现在导航项中的 id。持续时间以毫秒为单位。这是这个想法的一个工作示例:http://rolandmai.com/3d/
Update: Assuming that the code is pretty much the same, with some modifications to accomodate the solution, using the scrollTo plugin we can do:
Which requires that all the sections have an id that appears in the nav items. duration is in milliseconds. Here's a working example of the idea: http://rolandmai.com/3d/