如何更改平板电脑和智能手机上的导航栏,使其如下所示: http://sdz-upload.s3.amazonaws.com/prod/upload/img064.JPG
实际上我的标准导航栏看起来像这样:
<header class="container col-lg-12 col-md-12 col-sm-12 col-xs-12">
<!-- Navigation
================================================== -->
<nav class="navbar navbar-inverse navbar-fixed-top col-lg-12 col-md-12 col-sm-12 col-xs-12" role="navigation">
<a href="#page-top" class="navbar-brand">La maison de l'architecture</a>
<ul class="nav navbar-nav">
<li class="hidden"><a href="#page-top"></a></li>
<li><a href="#accueil" class="active">Accueil</a></li>
<li><a href="#qui">Qui sommes-nous ?</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
答案 0 :(得分:0)
查看bootstrap documentation,您没有使用正确的导航栏。
以下是您应该使用的内容:
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">La maison de l'architecture</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#accueil" class="active">Accueil</a></li>
<li><a href="#qui">Qui sommes-nous ?</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
答案 1 :(得分:0)
通过使用 bootstrap ,您可以完全像这样实现导航栏。 有关详细信息click here
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Case</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">La maison de l'architecture</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Accueil</a></li>
<li><a href="#">Qui sommes-nous ?</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<h3>Collapsible Navbar</h3>
<p>In this example, the navigation bar is hidden on small screens and replaced by a button in the top right corner (try to re-size this window).
<p>Only when the button is clicked, the navigation bar will be displayed.</p>
</div>
</body>
</html>
&#13;
答案 2 :(得分:-1)
使用媒体查询,您可以更改它。
.update
答案 3 :(得分:-1)
ul{
list-style:none;
}
首先,您需要从左侧删除点