我似乎无法证明我的链接,并在导航栏中显示我的徽标。我的链接和徽标将在左侧重叠。我想这样做,所以我的链接将证明我的徽标的权利。
%body
%nav.navbar.navbar-inverse.navbar-fixed-top
.container-fluid
.navbar-header
%button.navbar-toggle.collapsed{"aria-controls" => "navbar", "aria-expanded" => "false", "data-target" => "#navbar", "data-toggle" => "collapse", :type => "button"}
%span.sr-only Toggle navigation
%span.icon-bar
%span.icon-bar
%span.icon-bar
.container-fluid
.navbar-header
%a.navbar-brand{:href => "#"}
%img{:alt => "IMage", :height => "50", :src => "/assets/logo.png"}
%ul.nav.navbar-nav.nav-justified
%li
%a{:href => "#"} link
%li
%a{:href => "#"} Link
%li
%a{:href => "#"} link
%li
%a{:href => "#"} link
%li
%a{:href => "#"} link
%li
%a{:href => "#"} link
%li
%a{:href => "#"} link
%li
%a{:href => "#"} link
CSS
.navbar {
position: relative;
background-color: #004170;
padding-top: 15px;
padding-bottom: 15px;
margin-bottom: 0;
font-size: 18px;
}
.navbar-nav.nav-justified > li{
float:none;
}
答案 0 :(得分:1)
尝试从导航条代码中删除.navbar-nav
类。
%ul.nav.navbar-nav.nav-justified
到
%ul.nav.nav-justified
如果导航稍微向下移动,则可以设置以下属性:
.nav-justified {
width: 98%;
}
.nav-justified > li {
float: none;
}
它对我有用。