博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jquery datatable 美化
阅读量:6185 次
发布时间:2019-06-21

本文共 4124 字,大约阅读时间需要 13 分钟。

hot3.png

效果图

154441_Uiir_1421356.png

部分less代码

@pinet-screen-width: 2880;.mixin-sorting(@bg) {    &.sorting_1 {        background-color: @bg;        color: #3d8dc6;        a {            color: #3d8dc6;        }    }    &.sorting_2 {        background-color: @bg;        color: #3d8dc6;        a {            color: #3d8dc6;        }    }    &.sorting_3 {        background-color: @bg;        color: #3d8dc6;        a {            color: #3d8dc6;        }    }            }.datatable_res(@width) {    .dataTables_wrapper.no-footer {        border: 1px solid #eff0f2;        border-radius: 7px;        background: #ffffff;        .dataTables_length {            display: none;        }        .dataTables_filter {            display: none;        }        .dataTables_paginate {            padding-top: 20px / @pinet-screen-width * @width;            padding-bottom: 20px / @pinet-screen-width * @width;            padding-right: 10px / @pinet-screen-width * @width;        }    }    table.dataTable {        thead,tbody {            tr {                th,td {                    padding-top: 0;                    padding-bottom: 0;                    height: 80px / 2880 * @width;                    line-height: 126px / 2880 * @width;                }                th {                    line-height: 126px / 2880 * @width;                }            }            tr.datatable-iframe-container {                padding: 0;                height: 0;                td {                    padding: 0;                    height: 0;                    border: 0;                    iframe {                        display: none;                        width: 100%;                        height: 450px;                        background: transparent;                    }                                }                border: 0;            }                    }    }        table.dataTable.no-footer {        border-bottom: 1px solid #e3e3e3;     }    table.dataTable.display {        thead {            .sorting,            .sorting_asc,            .sorting_desc,            .sorting_asc_disabled,            .sorting_desc_disabled {                background: none;            }            .sorting_asc,            .sorting_desc {                color: #3d8dc6;            }                                    th {                background-color: #ffffff;                text-align: center;                  border-bottom: 1px solid #e3e3e3;                            }        }        tbody {            tr {                td {                    text-align: center;                    color: #777d85;                                        a {                        color: #777d85;                    }                    &:first-child {                        text-align: left;                    }                }            }            tr.odd, tr.even {                td {                     background-color: #fafafa;                    .mixin-sorting(#fafafa);                    }                &:hover {                    td {                        background-color: #ffffff;                        .mixin-sorting(#ffffff);                        }                                    }            }            tr.ui-selected {                td {                     background-color: #21bbe8;                    .mixin-sorting(#21bbe8);                }                &:hover {                    td {                        background-color: #5fd3f4;                        .mixin-sorting(#5fd3f4);                                        }                                    }            }                        }        }    .datatable-toggle {        margin-left: 20px;        border-radius: 50%;        border-color: transparent;        background: #e7eaeb;        .glyphicon {            color: #ffffff;            margin-top: 4px;            font-size: 18px;        }        &:hover {            border-color: transparent;        }    }}@media screen and (min-width: 1440px) {    .datatable_res(1440px);}@media screen and (min-width: 1920px) {    .datatable_res(1920px);}

转载于:https://my.oschina.net/u/1421356/blog/308480

你可能感兴趣的文章
ArcGIS 客户端API加载大量数据的几种解决方法(转载)
查看>>
性能测试初学_loadrunner脚本增强
查看>>
通过队列解决Lucene文件并发创建索引
查看>>
Sharepoint ECMAScript
查看>>
jQuery获取自动截取过长的文本内容,显示成省略号
查看>>
nginx 代理http配置实例
查看>>
python: 不同级别的日志输出到不同文件的日志类
查看>>
一般处理程序HttpHandler的应用
查看>>
C#中double值的精度问题
查看>>
python-redis缓存-pool
查看>>
【团队博客】暑期软件开发学习感悟
查看>>
fitnesse - 用例创建编辑、管理、执行和日志
查看>>
[转载] 谈面试
查看>>
The difference between Severity and Priority
查看>>
js里实现给数字加三位一逗号间隔的两种方法
查看>>
DOS命令大全(经典收藏)
查看>>
Android数字选择器-NumberPicker
查看>>
zoj 3547 The Boss on Mars 第36届ACM大连预选赛I题
查看>>
javascript基础
查看>>
小学生四则运算应用软件(二)
查看>>