如何阻止该 div 位于滚动条顶部而不破坏我的 JQuery ScrollTo 插件?
我正在构建的网站遇到了一些问题。我正在使用 jQuery 插件“滚动到”,因为该网站是一个包含不同部分的完整页面。现在,当用户向下滚动时,我试图将导航栏固定在页面顶部,但目前它位于滚动条的顶部。
我找到了如何阻止它坐在滚动条顶部的答案,它说我应该删除“overflow:auto;”来自“包装器”div,但不知何故,这杀死了我的 ScrollTo 插件,并且链接不再有效。
我希望页面右侧有一个滚动条,用户可以使用它向下滚动,但我希望大的白色导航栏保持固定在顶部。
我的网站可以从此链接下载> http://dl.dropbox.com/u/14917277/YW4YW%20Website.zip - 它只是一个小网站,因此下载不需要两秒钟。
非常感谢任何帮助,非常感谢各位!
I am having a little bit of trouble with a website I'm building. I am using the jQuery plug-in "scroll to" as the website is one complete page with different sections. Now I am trying to keep the navigation bar fixed at the top of the page when the user scrolls down, but at the moment it is sitting over the top of the scrollbar.
I found an answer for how to stop it sitting on top of the scrollbar, which said that I should remove "overflow:auto;" from the 'wrapper' div, but somehow, this killed my ScrollTo plug in, and the links no longer worked.
I want one scrollbar on the right hand side of the page, that users can use to scroll down, but I want the big white navigation bar to stay at fixed at the top.
My website can be downloaded from this link > http://dl.dropbox.com/u/14917277/YW4YW%20Website.zip -
It is only a small website so will not take two seconds to download.
Any help is HUGELY appreciated, thanks a load guys and girls!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么要将内容放在包装器溢出的 div 中?发生这种情况是因为包装器的 z 索引低于顶部栏。取下包装纸。让内容正常溢出即可!
将您的索引文件替换为:
但是,我想说该网站看起来相当不错。
Kp超平面
Why are putting your content in a wrapper overflowing div? This is happening because the wrapper has a z-index that is lower than the top bar. Remove the wrapper. Just let the content overflow normally!
Replace your index file with this:
However, I would like to say the site is looking quite nice.
Kpsuperplane