JqGrid 隐藏水平滚动条完美解决方案

我有强迫症,网上找的几个看着就不舒服

不用更改样式表,隐藏最右侧的边框。

.ui-jqgrid .ui-jqgrid-bdiv{ overflow-x: hidden; }

不用通过js控制加1px

$(grid_selector).closest('.ui-jqgrid-bdiv').width($(grid_selector).closest('.ui-jqgrid-bdiv').width() + 1);

最完美解决方案,添加如下样式

    div.ui-jqgrid-view table.ui-jqgrid-btable {
        border-style: none;
        border-top-style: none;
        border-collapse: separate;
    }

        div.ui-jqgrid-view table.ui-jqgrid-btable td {
            border-left-style: none;
        }

    div.ui-jqgrid-view table.ui-jqgrid-htable {
        border-style: none;
        border-top-style: none;
        border-collapse: separate;
    }

    div.ui-jqgrid-view table.ui-jqgrid-btable th {
        border-left-style: none;
    }

from:http://stackoverflow.com/questions/5647313/unnecessary-horizontal-scrollbar-jqgrid

原文地址:https://www.cnblogs.com/xcong/p/4204884.html