JQuery 幻灯片问题
我在使用 JQuery 及其 SlideUp 和 SlideDown 函数时遇到问题。基本上,我有两个导航栏,根据用户单击的按钮滑出和滑入。然而,由于这个原因,这些功能会将内容减少一两个像素(取决于您使用的浏览器,尽管通常会减少 1 像素)。
您可以在此处查看该问题的工作示例: http://www.brianwritescode.com/index .php/博客/
I'm having an issue with JQuery and it's slideUp and SlideDown functions. Basically, i have two navigation bars that slide out and in depending on which button the user clicks. However as a result of this the functions are knocking the content down a pixel or two (depending on which browser you are using although it's normally 1px down).
You can see a working example of the issue here: http://www.brianwritescode.com/index.php/blog/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到了问题所在。
您想要做的是将这 2 个导航元素从文档流中取出,以便它们与下面的内容无关。您可以将这 2 个导航包裹在一个 div 中,并将该 div 设置为绝对位置。
I see the problem.
What you want to do is take these 2 nav elements out of the flow of the document so that they have no bearing on the content below. You could wrap these 2 navs inside a div and set that div to position absolute.