zoukankan      html  css  js  c++  java
  • bootstrap实现表格

    • 基本实例样式
      • 效果
      • 代码
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <title>用户管理页面</title>
        
            <!-- Bootstrap core CSS -->
            <link href="css/bootstrap.min.css" rel="stylesheet">
            <link href="css/dashboard.css" rel="stylesheet">
        
            <script src="js/jquery.min.js"></script>
            <script src="bootstrap-4.3.1-dist/js/bootstrap.min.js"></script>
        
            <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
            <script src="https://cdn.staticfile.org/vue-router/2.7.0/vue-router.min.js"></script>
        </head>
        <body>
        
            <!-- container自适应 -->
            <div class="container">
                <!-- 为表格添加基础样式 ,.table为任意<table>添加基本样式 -->
                <table class="table">
                    <!-- 表格标题行的容器元素,用来识别表格列 -->
                    <thead>
                        <tr>
                            <!-- 特殊的表格单元格,用来识别行或列 -->
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                        </tr>
                    </thead>
                    <!-- 表格主题中的表格行的容器元素 -->
                    <tbody>
                        <!-- 一组出现在单行单元格的容器元素 -->
                        <tr>
                            <!-- 默认的表格单元格 -->
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                        </tr>
                        <tr>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        
        </body>
        </html>
    • 条纹状表格
      • 效果
      • 代码
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <title>用户管理页面</title>
        
            <!-- Bootstrap core CSS -->
            <link href="css/bootstrap.min.css" rel="stylesheet">
            <link href="css/dashboard.css" rel="stylesheet">
        
            <script src="js/jquery.min.js"></script>
            <script src="bootstrap-4.3.1-dist/js/bootstrap.min.js"></script>
        
            <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
            <script src="https://cdn.staticfile.org/vue-router/2.7.0/vue-router.min.js"></script>
        </head>
        <body>
        
            
            <div class="container">
                <!-- .table-striped可以给tbody之内的每一行添加斑马条纹样式 -->
                <table class="table table-striped">
                   
                    <thead>
                        <tr>
                            
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                        </tr>
                    </thead>
                    
                    <tbody>
                        
                        <tr>
                           
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                        </tr>
                        <tr>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        
        </body>
        </html>
    • 带边框表格
      • 效果
      • 代码
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <title>用户管理页面</title>
        
            <!-- Bootstrap core CSS -->
            <link href="css/bootstrap.min.css" rel="stylesheet">
            <link href="css/dashboard.css" rel="stylesheet">
        
            <script src="js/jquery.min.js"></script>
            <script src="bootstrap-4.3.1-dist/js/bootstrap.min.js"></script>
        
            <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
            <script src="https://cdn.staticfile.org/vue-router/2.7.0/vue-router.min.js"></script>
        </head>
        <body>
            <div class="container">
                <!-- 
                    .table-bordered为表格和其中的每个单元格增加边框
                -->
                <table class="table table-bordered">
                   
                    <thead>
                        <tr>
                           
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                            <th>测试标题</th>
                        </tr>
                    </thead>
                   
                    <tbody>
                       
                        <tr>
                            
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                        </tr>
                        <tr>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                            <td>测试内容</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        
        </body>
        </html>
  • 相关阅读:
    [经验栈]C#中几种定时器(timer)的区别
    [经验栈]C#与泰克示波器(Tektronix oscilloscope)MSO64通信操作
    [经验栈]C#监测IPv4v6网速及流量
    [技术栈]CRC校验原理及C#代码实现CRC16、CRC32计算FCS校验码
    [技术栈]C#利用Luhn算法(模10算法)对IMEI校验
    [经验栈]SQL语句逻辑运算符"AND"、"&&"兼容性
    Winform或WebForm使用ReportViewer报表设计,工具栏按钮英文显示的解决办法
    Dev 使用RibbonForm打开多标签窗体,主窗体的Text显示一个
    Devexpress如何获取RadioGroup选中项的值和显示值
    MySQL远程连接失败,MySQL远程连接出现Using password:YES错误的解决办法
  • 原文地址:https://www.cnblogs.com/fatRabbit-/p/10761644.html
Copyright © 2011-2022 走看看