[英]Bootstrap 3 affix. Cannot remove margin-top
I cannot seem to find where the margin-top is coming from when using the affix plugin on my Navbar. 在Navbar上使用affix插件时,我似乎无法找到margin-top的来源。
I have [a website here] that may make it easier to see. 我[这里有一个网站]可以让你更容易看到。
Is this something in which I should be using Javascript? 这是我应该使用Javascript的东西吗? I'm not hugely advanced yet on that and so it could be I missed something to do with that.
我还没有那么先进,所以我可能错过了与之相关的事情。 Thanks.
谢谢。
It's not a margin; 这不是保证金; instead
.affix
is being positioned 50px from the top of the viewport - just change top
to 0 instead: 相反,
.affix
位于视口顶部50px处 - 只需将top
更改为0:
.affix {
position: fixed;
top: 0;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.