Bootstrap 的對齊導航


對於 Bootstrap 中的對齊導航,請使用 .nav-justfied 類。你可以嘗試在網頁上執行以下程式碼以實現對齊導航

示例

即時演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body style="background: yellow;">
      <h2>Subjects</h2>
      <ul class = "nav nav-tabs nav-justified">
         <li class = "active"><a href = "#">Home</a></li>
         <li><a href = "#">Tutorials</a></li>
         <li><a href = "#">Videos</a></li>
         <li><a href = "#">QA</a></li>
         <li><a href = "#">Tutors</a></li>
      </ul>
   </body>
</html>

更新於: 2020 年 6 月 12 日

149 次瀏覽

開啟你的 職業生涯

透過完成課程獲得認證

開始
廣告
© . All rights reserved.