gpt4 book ai didi

HTML, Bootstrap 3 : curved bottom brand navbar

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

我想使用 Bootstrap 3 制作一个 NavBar,如下所示:

enter image description here

但是,我似乎无法在中心找到圆形的品牌标志,这是当前结果: enter image description here

我当前导航栏的代码是这样的:

<div class="container">
<div class="nav-color">
<div class="nav-wrap">

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">



<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#"><span class="hidden-xs"></span><span class="text">Insert Image</span></a></li>
<li class=""><a href="#"><span class="hidden-xs"></span><span class="text">Insert Image</a></li>
<li class="logo hidden-xs"><a href="#"><img alt="Insert Image Logo" src=""></a></li>
<li class=""><a href="#"><span class="hidden-xs"></span><span class="text">Insert Image</span></a></li>
<li class=""><a href="#"><span class="hidden-xs"></span><span class="text">Insert Image</span></a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>

我不确定如何在不将整个部分向下推的情况下在中间留出空白的情况下将 Logo 品牌的底部弄圆。

最佳答案

只添加一些css,点击运行,查看全页,看看这是不是你想要的,如果是,你也需要覆盖菜单悬停的样式

.logo {
width: 120px;
height: 50px;
}

.logo a {
height: 90px;
background: yellow;
border-radius: 0 0 40px 40px;
}

.logo img {
background: green;
width: 60px;
height: 60px;
margin: 0 15px;
border-radius: 100%;
display: block;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="nav-color">
<div class="nav-wrap">

<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">



<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#"><span class="hidden-xs"></span><span class="text">Insert Image</span></a></li>
<li class=""><a href="#"><span class="hidden-xs"></span><span class="text">Insert Image</a></li>
<li class="logo hidden-xs">
<a href="#"><img alt="Insert Image Logo" src=""></a>
</li>
<li class=""><a href="#"><span class="hidden-xs"></span><span class="text">Insert Image</span></a></li>
<li class=""><a href="#"><span class="hidden-xs"></span><span class="text">Insert Image</span></a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
</div>

关于HTML, Bootstrap 3 : curved bottom brand navbar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49231794/

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