使用 Bootstrap 網格佈局建立三個不等寬的列


要建立三個不等寬的 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>
      <div class = "container-fluid">
         <h2>Bootstrap Grid Unequal Columns</h2>
         <div class="row">
            <div class = "col-sm-8" style = "background-color:green; color: white;">Column One</div>
            <div class = "col-sm-2" style = "background-color:orange; color: white;">Column Two</div>
            <div class = "col-sm-2" style = "background-color:gray; color: white;">Column Three</div>
         </div>
      </div>
   </body>
</html>

更新日期:12-6 月-2020

436 次訪問

開啟你的 職業

完成課程獲得認證

開始
廣告