天天看點

laui 彈出層下拉選溢出出現滾動條解決

當彈出層裡的下拉選擇框選項過多,超出彈出層時,彈出層出現了滾動條,影響美觀。

解決方案:在html标簽下面添加css屬性,css屬性要在laui插件的下邊

<!-- 選擇部門 -->
<div id="deptLayer" style="display: none;padding:10px; width:500px; height:500px;overflow:auto !important;">
    <ul id="deptTree" class="ztree" style="overflow:auto !important;"></ul>
</div>


<script src="../../../statics/layuiadmin/layui//layui.js"></script>
<style type="text/css">
	.layui-layer-page .layui-layer-content {
	    overflow: auto !important;
	}

    .table>caption+thead>tr:first-child>td, .table>caption+thead>tr:first-child>th, .table>colgroup+thead>tr:first-child>td, .table>colgroup+thead>tr:first-child>th, .table>thead:first-child>tr:first-child>td, .table>thead:first-child>tr:first-child>th {
        border-top: 0;
        border-bottom: #DDDDDD solid 1px;
    }
    .ui-jqgrid .ui-jqgrid-btable tbody tr.jqgrow td {
        overflow: hidden;
        white-space: pre;
        padding-right: 2px;
        height: 40px;
        line-height: 40px;
    }
</style>
           

繼續閱讀