为 bootstrap 搜索设置固定位置
set fixed position for bootstrap search
我正在为我的 table 使用 bootstrap 搜索设计..这是我在图像中面临的问题
当我向右滚动到 window 时,搜索和分页样式也会更改其位置。我希望它固定在 table 的右上角和右下角,即使我滚动 table...
这是我正在使用的搜索的 bootstrap 代码..
$('#dtreport').DataTable({
"oLanguage": {
"sLengthMenu": 'Display <select name="dtAgents_length" aria-controls="dtAgents" class="form-control input-sm">' +
'<option value="5">5</option>' +
'<option value="10">10</option>' +
'<option value="25">25</option>' +
'<option value="50">50</option>' +
'<option value="75">75</option>' +
'<option value="100">100</option>' +
'<option value="-1">All</option>' +
'</select> records',
"sInfo": '<label>Displaying _START_ to _END_ of _TOTAL_ records.</label>',
"sZeroRecords": '<center><span style="color: red;"><i class="fa fa-users fa-2x"></i> No report found.</span></center>',
"sInfoEmpty": '<label>Displaying 0 to 0 of 0 records.</label>',
"sInfoFiltered": '<label>(filtered from _MAX_ total entries)</label>'
},
"aLengthMenu": [[5, 10, 25, 50, 75, 100, -1], [5, 10, 25, 50, 75, 100, 'All']],
"iDisplayLength": 5
});
谢谢...
"scrollX": true,
columnDefs: [
{
targets: 0,
type: 'natural'
}
],
只需在数据表之后添加这些行({..
对我有用..
我正在为我的 table 使用 bootstrap 搜索设计..这是我在图像中面临的问题
当我向右滚动到 window 时,搜索和分页样式也会更改其位置。我希望它固定在 table 的右上角和右下角,即使我滚动 table...
这是我正在使用的搜索的 bootstrap 代码..
$('#dtreport').DataTable({
"oLanguage": {
"sLengthMenu": 'Display <select name="dtAgents_length" aria-controls="dtAgents" class="form-control input-sm">' +
'<option value="5">5</option>' +
'<option value="10">10</option>' +
'<option value="25">25</option>' +
'<option value="50">50</option>' +
'<option value="75">75</option>' +
'<option value="100">100</option>' +
'<option value="-1">All</option>' +
'</select> records',
"sInfo": '<label>Displaying _START_ to _END_ of _TOTAL_ records.</label>',
"sZeroRecords": '<center><span style="color: red;"><i class="fa fa-users fa-2x"></i> No report found.</span></center>',
"sInfoEmpty": '<label>Displaying 0 to 0 of 0 records.</label>',
"sInfoFiltered": '<label>(filtered from _MAX_ total entries)</label>'
},
"aLengthMenu": [[5, 10, 25, 50, 75, 100, -1], [5, 10, 25, 50, 75, 100, 'All']],
"iDisplayLength": 5
});
谢谢...
"scrollX": true,
columnDefs: [
{
targets: 0,
type: 'natural'
}
],
只需在数据表之后添加这些行({..
对我有用..