zoukankan      html  css  js  c++  java
  • Bootstrap历练实例:带表格的面板

    带表格的面板

    为了在面板中创建一个无边框的表格,我们可以在面板中使用 class .table。假设有个 <div> 包含 .panel-body,我们可以向表格的顶部添加额外的边框用来分隔。如果没有包含 .panel-body 的 <div>,则组件会无中断地从面板头部移动到表格。

    下面的实例演示了这点:

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Bootstrap历练实例:带表格的面板</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <link rel="stylesheet" href="bootstrap-3.3.5-dist/css/bootstrap.min.css" />
    </head>
    <body>
    <div style="padding:20px">
    <div class="panel panel-success">
    <div class="panel-heading">
    <h2 class="panel-title">面板标题</h2>
    </div>
    <div class="panel-body">
    <table class="table">
    <thead>
    <tr>
    <th>produce</th><th>price</th>
    </tr>
    <tr><td>A001</td><td>100</td></tr>
    <tr><td>A002</td><td>200</td></tr>
    </thead>
    </table>
    </div>
    </div>
    <div class="panel panel-primary">
    <div class="panel-heading">
    <h2 class="panel-title">面板标题</h2>
    </div>
    <div class="panel-body">
    面板主题
    </div>
    <table class="table">
    <thead>
    <tr>
    <th>produce</th>
    <th>price</th>
    </tr>
    <tr><td>A001</td><td>100</td></tr>
    <tr><td>A002</td><td>200</td></tr>
    </thead>
    </table>
    </div>
    <div class="panel panel-info">
    <div class="panel-heading">
    <h2 class="panel-title">面板标题</h2>
    </div>

    <table class="table">
    <thead>
    <tr>
    <th>produce</th>
    <th>price</th>
    </tr>
    <tr><td>A001</td><td>100</td></tr>
    <tr><td>A002</td><td>200</td></tr>
    </thead>
    </table>
    </div>
    </div>

    <script src="jQuery/jquery-2.1.4.js"></script>
    <script src="bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
    </body>
    </html>

  • 相关阅读:
    Luogu-P2295 MICE
    Luogu-P2627 修剪草坪
    Loj-10176-最大连续和
    Luogu-P1886 滑动窗口
    Luogu-P3807 【模板】卢卡斯定理
    Luogu-P1879 [USACO06NOV]玉米田Corn Fields
    Luogu-P1896 [SCOI2005]互不侵犯
    Loj-SGU 223-国王
    Luogu-P2657 [SCOI2009]windy数
    素数
  • 原文地址:https://www.cnblogs.com/melao2006/p/5001503.html
Copyright © 2011-2022 走看看