-2
我正在使用引導程序3在我的頁面中製作導航欄,它不適用於小屏幕,當我嘗試最小化屏幕時,導航欄未摺疊良好,問題是什麼?下面是一個jsFiddle如何在小屏幕上調整導航欄?
<div class="container">
<div class="row">
<img id="logo" src="../lib/css/images/Logo.jpg" class="pull-left" width="100px" height="100px">
<nav class="navbar navbar-inverse" style="height: 40px;margin-left: 105px;">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#myNavbar" 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" style="height: 30px;margin-top:-12px;">Welcome</a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="dropdown"><a href="#" data-toggle="modal" data-target="#modal-1">Add New Category</a></li>
<li class="dropdown"><a href="#" data-toggle="modal" data-target="#modal-2">Search Orders</a></li>
<li class="dropdown"><a href="#" data-toggle="modal" data-target="#modal-3">Calendar</a></li>
<li class="dropdown"><a href="#" data-toggle="modal" data-target="#modal-4">Order status</a></li>
</ul>
<ul>
<li class="nav navbar-nav navbar-right">
<?php
if(isset($_SESSION["username"]))
{
echo '<a href="../logout.php" id="logout" class="btn btn-success CustLog">Log out</a>';
echo '<h5>Welcome- '.$_SESSION["username"].'</h5>';
}
else
{
header("location:../login.php");
}
include_once "connect.php";
?>
</li>
</ul>
</div>
</div>
</nav>
</div>
</div>
請檢查結果我在頁面上得出上述快照當我嘗試到頁面最小化 –