具有移动支持和 Logo 的 Html 导航栏

标签 html css responsive-design navbar

我想在我的网站上有一个导航栏,但无法弄清楚我希望它看起来像 this 但我想在它上面有一个标志,所以这就是我遇到的问题。它应该看起来像这个 site 上的底部

最佳答案

转到 https://getbootstrap.com/getting-started/ ,您可以学习使用 Bootstrap 轻松创建导航栏等内容。

将它放在 head 部分的 html 脚本的顶部,以便 bootstrap 工作或下载 bootstrap 并将其放在您的元素文件夹中。

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

这是一个使用 bootstrap 的例子。

        <!--appear when room to display is smaller-->

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#top">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
      </button>
        <a class="navbar-brand" href="#">Your Logo</a>
      </div>


      <div class="collapse navbar-collapse" id="top">
        <ul class="nav navbar-nav">
          <li class="active">
            <a href ="put your link here">
              Item 
            </a>
          </li>

     <!--align content to the right-->
      <ul class="nav navbar-nav navbar-right">
        <li class="active">
          <a href ="">
            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>&nbsp;
            Item
          </a>
        </li>
        <li class="active">
          <a href ="">
            <span class="glyphicon glyphicon-off" aria-hidden="true"></span>&nbsp;
            Item
          </a>
        </li>
      </ul>
      </div>
    </div>
  </nav>

关于具有移动支持和 Logo 的 Html 导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37784866/

相关文章:

javascript - 如何只获取 jQuery 中的可见元素?

css - 显示:box and display:flexbox in css3有什么区别

javascript - 如何将动态创建的超链接的 css 值传递给另一个页面

html - 背景中的多种颜色/图像 + 内容

css - 水平居中页面的全部内容

javascript - 如何切换其他引导按钮的内容?

javascript - 使用 redux 构建 React 应用程序时在何处存储 WebRTC 流

php - 为响应式媒体查询切换 php 字符限制

javascript - 检测窗口调整大小并使用 jquery 执行功能

html - 带有 twitter bootstrap 的台式机和平板电脑的相同样式