我有一个导航栏的网站。这个导航栏应包含两个标志,一个在左上角(盾形纹章),一个在右上角(童子军百合),并作为文本之间的链接。盾形纹章使用“navbar-brand”类。
标签:x1c 0d1x
在移动的屏幕上,它看起来像这样:
的
折叠视图是我喜欢的,但在展开视图中,我不想显示百合花,就像这样:
我试过修改类和ID,但是没有进展。我该怎么做呢?
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-danger fs-5">
<div class="container-fluid">
<a class="navbar-brand" href="#"><img src="https://via.placeholder.com/50" alt="Gau Franken" height="100" width="82"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav mr-auto mb-2 mb-md-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">
<h4>Selbstdarstellung</h4>
</a>
</li>
<li class="nav-item ">
<a class="nav-link" href="gruppen.html">
<h4>Gruppen</h4>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="links.html">
<h4>Links</h4>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="kontakt.html">
<h4>Kontakt</h4>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="impressum.html">
<h4>Impressum & Datenschutz</h4>
</a>
</li>
</ul>
<div>
<img src="https://via.placeholder.com/50" alt="Pfadfinderlilie" height="100" width="82">
</div>
</div>
</div>
</nav>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
字符串
1条答案
按热度按时间11dmarpk1#
我把类
d-none d-md-block
添加到百合花的图像div中,现在它可以按照我的要求工作了。字符串