2017-09-01 114 views
-1

爲什麼不做這項工作?我確定我已經正確設置了它,儘管這是我第一次使用bootstrap。我正在嘗試使用CDN發行版,但似乎無法使其發揮作用。它目前只是將它們顯示爲與在其他網站上使用時可以看到的導航欄相對的鏈接。爲什麼此引導程序導航欄無法正確顯示?

<!DOCTYPE html> 
<html lang="en"> 
<head> 
<!-- Required Meta Tags --> 
<meta charset="UTF-8"> 
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 

<!-- Bootstrap CSS --> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> 


<title>Fictional Football Club</title> 
</head> 
<body> 

<nav class="navbar navbar-default"> 
    <div class="container-fluid"> 

     <div class="nav navbar-nav"> 
      <ul> 
       <li><a href="#">News</a></li> 
       <li><a href="#">Matches</a></li> 
       <li><a href="#">Table</a></li> 
       <li><a href="#">Squad</a></li> 
       <li><a href="#">Tickets</a></li> 
      </ul> 
     </div> 
    </div> 

</nav> 

<div class="container"> 

</div> 

<!-- Optional JavaScript --> 
<!-- jQuery first, then Popper.js, then Bootstrap JS --> 
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> 
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> 
</body> 
</html> 

回答

2

導航欄結構不是Bootstrap 4.閱讀Bootstrap 4 navbar docs。 Bootstrap 4現在是測試版。

https://www.codeply.com/go/4GM7ligFGu

<nav class="navbar navbar-light bg-light navbar-expand"> 
    <ul class="navbar-nav"> 
     <li class="nav-item"><a class="nav-link" href="#">News</a> 
     </li> 
     <li class="nav-item"><a class="nav-link" href="#">Matches</a> 
     </li> 
     <li class="nav-item"><a class="nav-link" href="#">Table</a> 
     </li> 
     <li class="nav-item"><a class="nav-link" href="#">Squad</a> 
     </li> 
     <li class="nav-item"><a class="nav-link" href="#">Tickets</a> 
     </li> 
    </ul> 
</nav> 
+0

唉唉喝彩!這是我沒有檢查使用哪個版本。 –