zoukankan      html  css  js  c++  java
  • 关于datatables自适应以及自定义列宽度的总结

    table-layout:fixed;可以自定义列的宽度

    <div id="bizhi" style="100%;height: 85%;overflow-x: auto;">
                            <table id="data_table" class=""  style="100%;height: 100%;table-layout:fixed;font-size: 0.2rem !important;">
                                    <thead>
                                        <tr>
                                            <!--<th rowspan="2" style=" 5px !important;">序号</th>-->
                                            <!--<th rowspan="2" style=" 120px !important;">供热站</th>
                                            <th colspan="5" style=" 270px !important;">消耗指标</th>-->
                                            <th rowspan="2" style=" 36% !important;">供热站</th>
                                            <th colspan="5" style=" 64% !important;">消耗指标</th>
                                        </tr>
                                        <tr>
                                            <th>氧化钙</th>
                                            <th>NaOH溶液</th>
                                            <th>NaOH片碱</th>
                                            <th>尿素</th>
                                            <th>工业盐</th>
                                        </tr>
                                    </thead>
                            </table>
                        </div>

    //tab切换时会使表头元素宽度无法识别,先设置一个定时器,刚开始让所有的table的div都显示,在页面打开若干秒或者毫秒之后,让不该显示的div隐藏就好了hide(),
            setTimeout(function(){$("#changzhi").hide()},1000)

  • 相关阅读:
    Mac 简单切换jdk版本
    Mac下查看已安装的jdk版本及其安装目录
    MAC 安装telnet
    【转】JDK 内存参数含义
    【Netty4】深入学习Netty
    PAT甲题题解-1124. Raffle for Weibo Followers-模拟,水题
    PAT甲题题解-1060. Are They Equal (25)-字符串处理(科学计数法)
    PAT甲题题解-1061. Dating (20)-字符串处理,水水
    PAT甲题题解-1062. Talent and Virtue (25)-排序水题
    PAT甲题题解-1064. Complete Binary Search Tree (30)-中序和层次遍历,水
  • 原文地址:https://www.cnblogs.com/lxl0419/p/8984963.html
Copyright © 2011-2022 走看看