gpt4 book ai didi

html - Twitter bootstrap Navbar 与 Logo /品牌的合理链接

转载 作者:太空宇宙 更新时间:2023-11-04 11:35:36 25 4
gpt4 key购买 nike

我似乎无法证明我的链接是正确的,也无法在导航栏中显示我的 Logo 。我的链接和 Logo 将在左侧重叠。我想这样做,以便我的链接在我的 Logo 右侧对齐。

%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;
}

最佳答案

尝试从导航栏代码中删除 .navbar-nav 类。

%ul.nav.navbar-nav.nav-justified

%ul.nav.nav-justified

如果您的导航稍微向下移动,那么您可以设置以下属性:

.nav-justified {
width: 98%;
}
.nav-justified > li {
float: none;
}

它对我有用。

关于html - Twitter bootstrap Navbar 与 Logo /品牌的合理链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31780658/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com