在使用AngularJS ng-table制作的表格中,非常类似于:http://ng-table.com/#/demo/2-1我必须更改默认/上升/下降和正常/悬停/活动状态的排序符号的颜色。我假设它是由 CSS(SASS) 完成的,但选择器是什么以及在这种情况下如何使用它?
它在CSS中是两个类:
向上箭头和升序排序的 CSS :
.ng-table th.sortable .sort-indicator:after, {
border-color: #AB8383 transparent;
}
和向下箭头的 CSS:
.ng-table th.sortable .sort-indicator:before{
border-top: 4px solid #4D1F4B;
}
降序排序:
.ng-table th.sortable.sort-desc .sort-indicator:after{
border-top: 4px solid #420A0A;
}
对于悬停,您可以使用:
.ng-table th.sortable .sort-indicator:hover:after, .ng-table th.sortable .sort-indicator:hover:before{
//css rule here
}
覆盖某些类:
.ng-table th.sortable .sort-indicator:before,
.ng-table th.sortable.sort-desc .sort-indicator:after,
.ng-table th.sortable.sort-desc .sort-indicator:hover:after{
border-top: 4px solid #4D1F4B;
}
.ng-table th.sortable .sort-indicator:after,
.ng-table th.sortable.sort-asc .sort-indicator:after,
.ng-table th.sortable.sort-asc .sort-indicator:hover:after{
border-bottom: 4px solid #4D1F4B;
}