【发布时间】:2019-12-15 22:34:12
【问题描述】:
我正在使用 Ajax 数据表,当我选择一个页面时,我想要一个 css,而任何页面选择的背景颜色都应该更改,而不仅仅是鼠标悬停或活动。我怎么能做到这一点。这是我的 css 代码,它不是我想要的。
.dataTables_paginate :active {
background-color: blue;
}
请注意,它仅适用于页面点击。我想要我现在应该是不同颜色的页面。提前致谢 这是我的数据表代码。
function LoadPaging() {
$('#tblChannalList').DataTable({
"searching": false,
"lengthChange": false,
"bInfo": false,
"iDisplayLength": 5,
"showNEntries": false,
"dom": '<"top"i>rt<"bottom"flp><"clear">'
//"dom": '<"top"f>rt<"bottom"lp><"clear">',
//"sDom": 'RlfrtlipB',
//"dom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>'
});
return;
}
这是我的css代码
.paginatebutton {
background-color: white;
}
.dataTables_paginate {
width: 270px;
height: 30px;
position: fixed;
background-color: white;
top: 50%;
left: 50%;
margin-top: 340px;
margin-left: -100px;
/*text-align: center;*/
/*float: left !important;*/
}
.dataTables_paginate:active {
background-color: blue;
color:red;
}
.dataTables_paginate .paginate_button.current {
background: blue !IMPORTANT;
}
/*.pagination .page-item.current .page-link {
background-color: #000;
}*/
.pagination .page-item.active .page-link {
background-color: #000;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link:focus {
background-color: #000;
}
.pagination .page-item.active .page-link:hover {
background-color: #000;
}
【问题讨论】:
标签: jquery html css jquery-ui datatables