【发布时间】:2017-09-02 16:10:27
【问题描述】:
我使用下面的 css 作为表格标题,因为我使用图像作为标题颜色,所以排序图标在它后面。如何在图像顶部显示排序图标?
th {
background: url(https://jackrugile.com/images/misc/noise-diagonal.png),
linear-gradient(#777, #444) !important;
border-left: 1px solid #555 !important;
border-right: 1px solid #777 !important;
border-top: 1px solid #555 !important;
border-bottom: 1px solid #333 !important;
box-shadow: inset 0 1px 0 #999 !important;
color: #fff !important;
font-weight: bold !important;
padding: 10px 15px !important;
position: relative !important;
text-shadow: 0 1px 0 #000 !important;
line-height: 14px !important;
}
我尝试了以下 css 但没有运气:
table.dataTable thead span.sort-icon {
display: inline-block!important;
padding-left: 5px!important;
width: 16px!important ;
height: 16px!important
}
table.dataTable thead .sorting span { background: url('http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/images/sort_both.png') no-repeat center right!important; }
table.dataTable thead .sorting_asc span { background: url('http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/images/sort_asc.png') no-repeat center right!important; }
table.dataTable thead .sorting_desc span { background: url('http://cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/images/sort_desc.png') no-repeat center right!important; }
【问题讨论】:
标签: jquery css datatables