导航栏未显示

时间:2016-07-21 10:01:43

标签: javascript jquery html css

导入时,我的导航栏未显示

<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.js"></script>

它也没有在控制台中显示任何错误。我还添加了

<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.13.0/jquery.validate.min.js"></script>
<script type='text/javascript' src='http://partner.googleadservices.com/gampad/google_service.js'></script>  

我该怎么做才能显示我的导航栏。我需要导入这个cdn以进行其他验证。

2 个答案:

答案 0 :(得分:0)

设置导航栏的高度。 示例

.navbar { height: 100px; }

答案 1 :(得分:0)

试试这个

&#13;
&#13;
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</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.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  <script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.js"></script>
  <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.validate/1.13.0/jquery.validate.min.js"></script>
<script type='text/javascript' src='http://partner.googleadservices.com/gampad/google_service.js'></script>  
</head>
<body>

<nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <a class="navbar-brand" href="#">WebSiteName</a>
    </div>
    <ul class="nav navbar-nav">
      <li class="active"><a href="#">Home</a></li>
      <li><a href="#">Page 1</a></li>
      <li><a href="#">Page 2</a></li> 
      <li><a href="#">Page 3</a></li> 
    </ul>
  </div>
</nav>

</body>
</html>
&#13;
&#13;
&#13;