easyui的datagrid绘制坑

项目中使用easyui框架绘制表格,表格一定要用一个div包住,否则有的时候表格绘制出来是有问题的!

<div style="width:100%;height:90%;">
    <div id="table" style="width:100%;height:100%;"></div> 
</div>


$("#table").datagrid({});

在布局时,如果是上下两部分,上部分的高度固定,那么下部分则用定位做比较好,高度会自适应


<div style="position:relative;">
    <div style="width:100%;height:50px;"></div>
    <div style="position:absolute;width:100%;top:50px;left:0;bottom:0;"><div>
</div>

猜你喜欢

转载自blog.csdn.net/weixin_41700532/article/details/81664468