源代碼
點擊運行
<!DOCTYPE html> <html> <head> <title>Bootstrap 實例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css"> <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script> <script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script> </head> <body> <div class="container-fluid"> <h1>平板與桌面的網格布局</h1> <p>以下實例演示了在桌面設備的顯示器上兩個列的寬度各佔 50%,如果在平板端則左邊的寬度為 25%,右邊的寬度為 75%, 在移動手機等小型設備上會堆叠顯示。 </p> <p>重置瀏覽器窗口大小,查看傚果。</p> <div class="container-fluid"> <div class="row"> <div class="col-sm-3 col-md-6 bg-success"> RUNOOB </div> <div class="col-sm-9 col-md-6 bg-warning"> 教程 </div> </div> </div> </div> </body> </html>
運行結果