【发布时间】:2019-01-28 15:28:15
【问题描述】:
我正在尝试修复 IE11 中的 :before :after 伪样式。标题在其他标准浏览器中看起来不错,但在 IE11 或 Edge 中则不然。 Bootstrap4 有一个默认的垂直对齐:底部,我试图将其应用于数据表图标图像,但这也不起作用。有趣的是,fixedHeader 是真的,当我向下滚动时,标题看起来还不错。
JavaScript:
$(document).ready(() =>{
$('#results-table').DataTable({
columnDefs: [
{
orderable: false, targets: [0, 1]
}],
fixedHeader: true,
order: [[2, 'asc']],
paging: false,
searching: false,
scrollCollapse: false,
// autoWidth: true,
// heightMatch: 'auto',
info: false
});
});
HTML:
<table class="table" id="results-table" >
<thead class="thead-light text-center">
<tr>
<th rowspan="2">One</th>
<th rowspan="2" class="">Two</th>
<th rowspan="2">Three</th>
<th rowspan="2">Four</th>
<th rowspan="2">Five</th>
<th colspan="3"> Columns under</th>
</tr>
<tr>
<th scope="col">1</th>
<th scope="col">2</th>
<th scope="col">3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data</td>
<td>Data2</td>
<td>Data3</td>
<td>Data4</td>
<td>Data5</td>
<td>Data6</td>
<td>Data7</td>
<td>Data8</td>
</tr>
</tbody>
</table>
【问题讨论】:
标签: datatables bootstrap-4 internet-explorer-11 microsoft-edge