Bootstrap 中的非導航(標準)連結


使用常規導航欄導航元件之外的標準連結,然後使用類 navbar-link 為預設和反向導航欄選項新增合適的顏色。

你可以嘗試執行以下程式碼來設定標準連結 -

示例

線上演示

<!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>
      <nav class = "navbar navbar-default" role = "navigation" style = "background: green;">
         <nav class = "navbar navbar-default" role = "navigation">
            <div class = "navbar-header">
               <a class = "navbar-brand" href = "#">Website</a>
            </div>
            <div>
            <p class = "navbar-text navbar-right">
               Copyright
               <a href = "#" class = "navbar-link">TP</a>
            </p>
         </div>
      </nav>
   </body>
</html>

更新時間: 2020-06-12

137 次瀏覽

開啟你的 職業生涯

完成課程以取得認證

開始學習
廣告
© . All rights reserved.