獲取全寬且無圓角的 Bootstrap 巨型顯示塊


若要獲得全寬且無圓角的巨型顯示塊,請在所有.container類的外部使用.jumbotron類,而內部則新增 .container

示例

可嘗試執行以下程式碼來實現此功能

即時演示

<!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>
      <div class = "jumbotron">
         <div class = "container">
            <h1>Welcome to landing page!</h1>
            <p>Example for jumbotron.</p>
            <p>
               <a class = "btn btn-primary btn-lg" role = "button">
                  Click for more
               </a>
            </p>
         </div>
      </div>
   </body>
</html>

更新於: 2020-6-12

284 個瀏覽量

開啟你的職業生涯

完成課程,獲得認證

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