偏移載入程式列


使用偏移量可以拉開列之間的距離。若要在大顯示屏上使用偏移量,請使用 .col-md-offset-* 類。 

可以嘗試執行以下程式碼,瞭解如何在 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 = "box">
         <h1>Heading One</h1>
         <div class = "row" >
            <div class = "col-xs-6 col-md-offset-3" style = "background-color: #dedef8;
               box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">
               <p>This is demo text. This is demo text.</p>
            </div>
         </div>
      </div>
   </body>
</html>

更新時間:2020 年 6 月 12 日

6000 多次瀏覽

啟動你的 職業

完成課程後獲得認證

開始
廣告
© . All rights reserved.