将img /徽标居中,并在徽标周围制作导航栏项目

时间:2019-08-12 11:01:09

标签: html css bootstrap-4

我想使徽标居中,左侧有2个导航栏,右侧有2个。这将增加我的网站功能,并有助于获得更现代的外观。如果有人可以帮助我,我将非常感谢,非常感谢!!!

试图在这里搜索,但没有找到对我有用的东西。

<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<div class="container">
  <a class="navbar-brand" href="index.html">
  <img src="img\binet-logo1.png" height="70"width="100"  alt=""></a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarResponsive">
    <ul class="navbar-nav ml-auto">
      <li class="nav-item active">
                <li class="nav-item">
        <a class="nav-link" href="index.html">Дома</a>
      </li>

  <li class="nav-item dropdown">
    <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      Продукти
    </a>

    <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
      <a class="dropdown-item" href="produkti.html">Ултразвучни системи</a>
        </a>
      </li>

      <li class="nav-item">
        <a class="nav-link" href="zanas.html">За Нас</a>
      </li>

      </li>
      <li class="nav-item">
        <a class="nav-link" href="C:\Users\Bojan\Desktop\BinetMedical\contact.html">Контакт</a>
      </li>
    </ul>
  </div>
</div>

1 个答案:

答案 0 :(得分:0)

您可以尝试使用此代码在中间获得徽标,在侧面获得导航链接。

    <nav class="navbar navbar-expand-md navbar-fixed-top navbar-dark bg-dark">
    <div class="container">
        <ul class="nav navbar-nav">
            <li class="nav-item active">
                <a class="nav-link" href="index.html">Дома</a>
            </li>
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  Продукти
                </a>

                <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
                  <a class="dropdown-item" href="produkti.html">Ултразвучни системи</a>
                    </a>
                  </li>

        </ul>
        <ul class="nav navbar-nav mx-auto">
            <li class="nav-item">
              <a class="nav-link" href="#"> <img src="img\binet-logo1.png" height="70"width="100"  alt=""></a>
            </li>
        </ul>
        <ul class="nav navbar-nav">
            <li class="nav-item">
                <a class="nav-link" href="zanas.html">За Нас</a>
              </li>
              <li class="nav-item">
                  <a class="nav-link" href="C:\Users\Bojan\Desktop\BinetMedical\contact.html">Контакт</a>
                </li>
        </ul>
    </div>
</nav>

每个部分都是单独的ul,我添加了类mx-auto