• 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>
  • 相关阅读:
    left join 多表关联原理
    自适应居中n中方法
    docker 安装 卸载 Kubernetes安装
    jquery动态生成二维码图片,点击居中展示大图
    shiro 提供对外接口 实现一致性权限
    margin:0 auto解释;图片点击放大全屏
    编程总结
    eclipse插件安装和卸载方式
    ERROR org.hibernate.search.exception.impl.LogErrorHandler
    spring依赖注入和控制反转
  • 原文地址:https://www.cnblogs.com/2016-zck/p/13253913.html
Copyright © 2020-2023  润新知