これを解決する方法がわかりません。 Iveは "table-layout:fixed"を追加しようとしましたが、dtの現在のバージョンでは動作しません。水平にスクロールするときに、datatablesヘッダーが列と揃っていない
おかげ
var config = {
"bFilter": false,
"bInfo": false,
"bPaginate": true,
"scrollY": 200,
"table-layout":fixed,
"data": dataoMine,
"bAutoWidth": false,
"columns": columns,
"scroller": true,
"language": {
"emptyTable": "empty data"
},
"columnDefs": [
{"className": "dt-center", "targets": "_all"}
]
};
<table class="dataTable" style="width:80%; height:100%; margin-left:10%; margin-right:10%;}">
<thead><tr>
<th>a1</th>
<th>a2</th>
<th>a3</th>
<th>a4</th>
<th>a5</th>
<th>a6</th>
<th>a7</th>
<th>a8</th>
</tr></thead>
</table>
あなたはフィドルでこれを再現することはできますか?ここで出発点です - > http://jsfiddle.net/0f9Ljfjr/819/ – davidkonrad
@davidkonrad何も気にせず、ちょうどdtのコンストラクタに設定変数を渡してください。それはそれです –
テーブルのhtmlコードを表示できますか? – Yuri