【发布时间】:2020-07-08 15:57:59
【问题描述】:
我正在使用 datatable.js,并且正在尝试使我的表格可排序。排序有效,但我不知道为什么我的图标没有出现。
我的代码:
table.users thead .sorting:before, table.users thead .sorting_asc:before, table.users thead .sorting_asc_disabled:before, table.users thead .sorting_desc:before, table.users thead .sorting_desc_disabled:before {
top: 2px;
right: 1em;
content: "\2191";
}
div.dataTables_wrapper div.dataTables_filter {
text-align: right;
}
table.users thead .sorting:after, table.users thead .sorting:before, table.users thead .sorting_asc:after, table.users thead .sorting_asc:before, table.users thead .sorting_asc_disabled:after, table.users thead .sorting_asc_disabled:before, table.users thead .sorting_desc:after, table.users thead .sorting_desc:before, table.users thead .sorting_desc_disabled:after, table.users thead .sorting_desc_disabled:before {
position: absolute;
bottom: .9em;
display: block;
opacity: .3;
}
<table id="users" class="table table-hover users" width="100%">
<thead>
<tr>
<th class="sorting">Nickname</th>
<th>Rank</th>
<th>SteamID</th>
<th>Date</th>
<th>Last Access</th>
<th class="disabled-sorting text-right">Actions</th>
</tr>
</thead>
【问题讨论】:
标签: html css datatables