zoukankan      html  css  js  c++  java
  • booatrap中的表格样式

    调用bootstrap中的table样式,需要创建完整的table结构

    table>thead tbody tfoot>th tr td

    下列样式可以全部用到表格中

    .table 为table添加基本样式

    .table-striped 在tbody内添加斑马条纹

    .table-bordered 单元格加边框

    .table-hover 鼠标悬停行变色

    ..table-condensed 使表格更加紧凑

    案例

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
        <title>首页</title>
        <link href="assets/plugins/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet">
        <link href="assets/plugins/bootstrap/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet">
    </head>
    <body>
    <!--调用bootstrap中的table样式-->
    <table class="table table-striped table-bordered table-hover table-condensed">
        <thead>
            <tr>
                <th>标号</th>
                <th>备注</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>11</td>
                <td>11</td>
            </tr>
            <tr>
                <td>22</td>
                <td>22</td>
            </tr>
            <tr>
                <td>33</td>
                <td>33</td>
            </tr>
        </tbody>
        <tfoot></tfoot>
    </table>
    <!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 -->
    <!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
    <script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="assets/plugins/jquery-3.3.1.js"></script>
    </body>
    </html>

    运行结果

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3meta标签**放在最前面,任何其他容都**跟随其后! -->
    <title>首页</title>
    <link href="assets/plugins/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet">
    <link href="assets/plugins/bootstrap/css/bootstrap-theme.min.css" type="text/css" rel="stylesheet">
    </head>
    <body>
    <!--bootstrap中的table-->
    <table class="table table-striped table-bordered table-hover table-condensed">
    <thead>
    <tr>
    <th>标号</th>
    <th>备注</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>11</td>
    <td>11</td>
    </tr>
    <tr>
    <td>22</td>
    <td>22</td>
    </tr>
    <tr>
    <td>33</td>
    <td>33</td>
    </tr>
    </tbody>
    <tfoot></tfoot>
    </table>
    <!-- HTML5 shim Respond.js IE8 支持 HTML5 元素和媒体查询media queries)功能 -->
    <!-- 警告:通 file:// 协议(就是直接 html 面拖浏览器中)访问页 Respond.js 不起作用 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
    <![endif]-->
    <script src="assets/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="assets/plugins/jquery-3.3.1.js"></script>
    </body>
    </html>
  • 相关阅读:
    oracle学习篇十:序列
    oracle学习篇九:同义词
    oracle相关常识
    oracle之数据同步:Oracle Sql Loader使用说明(大批量快速插入数据库记录)
    oracle学习篇八:约束
    oracle学习篇七:更新操作、事务处理
    oracle学习篇六:子查询
    oracle学习篇五:组函数,分组统计
    oracle学习篇四:多表查询
    oracle学习篇三:SQL查询
  • 原文地址:https://www.cnblogs.com/2016-zck/p/13253913.html
Copyright © 2011-2022 走看看