源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Bootstrap 實例</title> <!-- 包含頭部信息用於適應不同設備 --> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- 包含 bootstrap 樣式表 --> <link rel="stylesheet" href="https://apps.bdimg.com/libs/bootstrap/3.2.0/css/bootstrap.min.css"> </head> <body> <div class="container"> <h2>表格</h2> <p>創建響應式表格 (將在小於768px的小型設備下水平滾動)。另外:添加交替單元格的背景色:</p> <div class="table-responsive"> <table class="table table-striped table-bordered"> <thead> <tr> <th>#</th> <th>Name</th> <th>Street</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Anna Awesome</td> <td>Broome Street</td> </tr> <tr> <td>2</td> <td>Debbie Dallas</td> <td>Houston Street</td> </tr> <tr> <td>3</td> <td>John Doe</td> <td>Madison Street</td> </tr> </tbody> </table> </div> <h2>圖像</h2> <p>創建響應式圖片(將擴展到父元素)。 另外:圖片以橢圓型展示:</p> <img src="/images/logo.png" class="img-responsive img-circle" alt="Cinque Terre" width="304" height="236"> <h2>圖標</h2> <p>插入圖標:</p> <p>云圖標: <span class="glyphicon glyphicon-cloud"></span></p> <p>信件圖標: <span class="glyphicon glyphicon-envelope"></span></p> <p>搜索圖標: <span class="glyphicon glyphicon-search"></span></p> <p>打印圖標: <span class="glyphicon glyphicon-print"></span></p> <p>下載圖標:<span class="glyphicon glyphicon-download"></span></p> </div> <!-- JavaScript 放置在文檔最後面可以使頁面加載速度更快 --> <!-- 可選: 包含 jQuery 庫 --> <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <!-- 可選: 合併了 Bootstrap JavaScript 插件 --> <script src="https://apps.bdimg.com/libs/bootstrap/3.2.0/js/bootstrap.min.js"></script> </body> </html>
運行結果