zoukankan      html  css  js  c++  java
  • bootstrap冻结窗口

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <link rel="stylesheet" href="../css/bootstrap-table.min.css">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- Latest compiled and minified JavaScript -->
    <script src="../js/bootstrap-table.min.js"></script>
    <!-- Latest compiled and minified Locales -->
    <!-- <link href="https://cdn.bootcss.com/bootstrap-table/1.14.2/extensions/fixed-columns/bootstrap-table-fixed-columns.css"
    rel="stylesheet">

    <script src="https://cdn.bootcss.com/bootstrap-table/1.14.2/extensions/fixed-columns/bootstrap-table-fixed-columns.js"></script>
    -->

    <link rel="stylesheet" href="../css/bootstrap-table-fixed-columns.css">
    <script src="../js/bootstrap-table-fixed-columns.js"></script>

    <style type="text/css">
    </style>
    </head>
    <body>
    <table id="table" class="table table-bordered table-hover" data-toggle="table" data-classes="table table-hover"
    data-show-columns="true" data-striped="true" data-show-toggle="true" data-search="true" data-show-refresh="true"
    data-toolbar="#toolbar" data-height="200">

    <thead>
    <tr>
    <th>表格 ID</th>
    <th>表格 Name</th>
    <th>表格 Price</th>
    <th>表格 Price</th>
    <th>表格 Price</th>
    <th>表格 Price</th>
    <th>表格 Price</th>
    <th>表格 Price</th>
    <th>表格 Price</th>
    <th>表格 Price</th>
    <th>表格 Price</th>
    </tr>
    </thead>
    <tbody>
    <tr>
    <td>1</td>
    <td>Item 1</td>
    <td>$1</td>
    <td>Item 1</td>
    <td>$1</td>
    <td>Item 1</td>
    <td>$1</td>
    <td>Item 1</td>
    <td>$1</td>
    <td>Item 1</td>
    <td>$1</td>
    </tr>
    <tr>
    <td>2</td>
    <td>Item 2</td>
    <td>$2</td>
    <td>Item 1</td>
    <td>$1</td>
    <td>Item 1</td>
    <td>$1</td>
    <td>Item 1</td>
    <td>$1</td>
    <td>Item 1</td>
    <td>$1</td>
    </tr>
    </table>
    <script type="text/javascript">
    //#table表示的是上面table表格中的id
    $("#table").bootstrapTable('destroy').bootstrapTable({
    fixedColumns: true,
    fixedNumber: 1, //固定列数
    });
    $(function() {
    $('#table').bootstrapTable();
    $(window).resize(function() {
    $('#table').bootstrapTable('resetView');
    });
    })
    </script>
    </body>
    </html>

    欢迎对it热情的同学,加qq进行技术讨论; QQ:850922253
  • 相关阅读:
    图像滤镜艺术---乐高像素拼图特效滤镜的代码实现
    假设你也23
    seajs载入流程图
    android 怎样将主菜单图标改成按安装时间排序
    热力学第一定律的社会学思考
    Django创建数据表
    KeyPress 和KeyDown 、KeyPress之间的区别
    Delphi 制作自定义数据感知控件并装入包(dpk文件)中(与DBText类似的数据感知控件)
    Delphi中的窗体创建与销毁
    Delphi ADOQuery连接数据库的查询、插入、删除、修改
  • 原文地址:https://www.cnblogs.com/zhangwensi/p/10823186.html
Copyright © 2011-2022 走看看