使用 Bootstrap 導航欄換行文字串


要使用類 .navbar-text,在元素中換行文字串。

示例

你可以嘗試執行以下程式碼,在 Bootstrap 導航欄中設定文字 −

線上演示

<!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">
         <div class = "navbar-header">
            <a class = "navbar-brand" href = "#">Demo</a>
         </div>
         <div>
            <p class = "navbar-text">Copyright © 2018</p>
         </div>
      </nav>
   </body>
</html>

更新於:12-Jun-2020

508 人瀏覽

開啟你的職業生涯

完成課程獲得認證

開始
廣告
© . All rights reserved.