打印带滚动条的table时,出现了只显示一张的情况
<div class="container query-table" id="query-table">
<div class="table-responsive tableResponsive" id="queryTable" style="overflow: scroll;height: 100%;">
<!--startprint-->
<table class="table text-center" id="printTable" style="border-left: none;">
<thead class="tableHeader"></thead>
<tbody class="tableBody"></tbody >
</table >
<!--endprint-->
</div>
</div>
解决办法:
/*dom显示高度的设置*/
html, body {
height: 100%;
}
#query-table {
height: 100%;
}
#queryTable {
height: 100%;
}
/*打印高度的设置*/
@media print {
html, body {
height: inherit;
}
#query-table {
height: inherit;
}
#queryTable {
height: inherit !important;
}
}