0
我即將拉出我的頭髮。我一直在努力嘗試讓全屏顯示在頂部(反向)的導航欄,但是作爲移動設備上的漢堡包。我原本在桌面設備上表現出色(請看附圖)。現在我有漢堡顯示好了,但桌面設備上的導航欄完全不顯示。我已將代碼剝離到最低限度,但無法讓導航欄顯示在桌面設備上。我在下面包含了我的代碼?有任何想法嗎。我非常沮喪。桌面和移動設備Navbar
<!DOCTYPE html>
<html>
<head>
<title>Project X -- Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
<link href='http://fonts.googleapis.com/css?family=Bree+Serif|Merriweather:400,300,300italic,400italic,700,700italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/bsStyle.css">
<link href="_/css/bootstrap.css" rel="stylesheet" media="screen">
<link href="_/css/mystyles.css" rel="stylesheet" media="screen">
</head>
<body id="home">
<div class="container">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="index.php">Home</a></li>
<li><a href="">About Us</a></li>
<li><a href="contact.php">Contact Us</a></li>
<li><a href="signup.php">Sign Up</a></li>
</ul><!-- nav navbar-nav -->
<ul class="nav navbar-nav navbar-right">
<li><a href="register.php">Register</a></li>
<li class="divider-vertical"></li>
<li class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown">Log In <strong class="caret"></strong></a>
<div class="dropdown-menu pull-right" style="padding: 15px; padding-bottom: 10px;">
<form action="login.php" method="post">
Username:<br /><input type="text" name="username" value="<?php echo $submitted_username; ?>" />
<br /><br />
Password:<br /><input type="password" name="password" value="" />
<br /><br />
<input type="submit" class="btn btn-info" value="Login" />
</form>
</div>
</li>
</ul>
</div>
</div><!--container-fluid-->
</nav>
</div><!--container-->
<section class="sidebar col col-lg-4">
</section><!-- sidebar -->
<section class="row">
<div class="col-xs-12">
<section class="branding">
<a href="index.php"><img src="/projectx/images/logo1.png" alt="Logo For Project X"></a>
<span style="color:red; float:right; margin-top:4%; margin-right: 4%; border: 3px black solid; padding: 3%">
</span>
</section>
</div>
</section><!-- branding -->
</section><!--sidebar-->
<script src="_/js/bootstrap.js"></script>
<script src="_/js/myscript.js"></script>
</body>
</html>
我想implememt此代碼,一切看起來都咕,但是當我點擊下拉菜單,沒有出現 – jjones150
你是如何實現它:重用的一切或僅部分?你有沒有發佈的自定義CSS? – vanburen
更新:我一直在試圖將這些東西拼湊在一起並進行修改。我發現我在主頁的底部留下了下面一段代碼: \t \t 這是造成這個問題。我仍在研究代碼以瞭解實際發生的情況,但這似乎是問題所在。 – jjones150