【发布时间】:2013-06-02 11:15:40
【问题描述】:
我在使用 twitter bootstrap 时遇到问题,这是我的导航栏的样子:
页面顶部和导航栏之间有空隙。 我尝试使用
.导航栏{ 位置:固定!重要; 顶部:0px;填充:0px;边距:0px; }
在我的 css 文件中,但它仍然无法正常工作。它在移动和桌面(使用响应式 css)中看起来像这样。我尝试将我的网站 css 放在响应式 css 之后和之前,但它没有做任何事情。有谁知道为什么会这样?
来自 bootstrap.css 的导航栏数据:
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: 1030;
margin-bottom: 0;
}
.navbar-fixed-top .navbar-inner,
.navbar-fixed-bottom .navbar-inner {
padding-right: 0;
padding-left: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
width: 940px;
}
.navbar-fixed-top {
top: 0;
}
.navbar-fixed-bottom {
bottom: 0;
}
.navbar .nav {
position: relative;
left: 0;
display: block;
float: left;
margin: 0 10px 0 0;
}
【问题讨论】:
-
导航栏的 CSS/HTML 代码是什么?
标签: html css twitter-bootstrap