出现滚动条右面不对其css就能解决
.fixed-table-box>.fixed-table_header-wraper {
overflow: hidden;
margin-right: 17px;
}
回复
兄弟,如果出现滚动条的话,滑动最右边会出现对不齐的问题,这个问题我替你解决了。
1.css这样改
.fixed-table-box>.fixed-table_header-wraper {
/* overflow:hidden;*/
overflow-x:hidden;
}2.js这样改
fixedTable: function() {
var $this = this;
return $this.each(function(index, item) {
var $this = $(this);
if (!$this.hasClass('fixed-table-box')) {
return;
}
if ($this.hasClass('head-fixed')) {
return;
}
//计算表格的宽度
$.calFixedTableWidth(item);
//计算固定列的高度
$.calFixedColHeight(item);
//同步滚动
$.syncScroll(item);
$this._setFixedIndex();
$this.rowHover();
// 横滚到最右边对不齐的解决思路
if ($(".fixed-table_body").height() > $(".fixed-table_body-wraper").height()) {
$(".fixed-table_header-wraper").css({
'overflow-y': 'scroll'
})
} else {
$(".fixed-table_header-wraper").css({
'overflow-y': 'hidden'
})
}
});
},