Skip to content
Discussion options

You must be logged in to vote

zoom和border-collapse设置都试过了,没什么效果。最后采用了outline的解决方法,这个方法也有弊端,表格固定头和下面表格会有1px的错位

.t-table__header--fixed > tr > th {
    outline: 1px solid var(--td-component-border);
    border-left: none;
    border-bottom: none;
  }
  .t-table__cell--fixed-left,
  .t-table__cell--fixed-right {
    outline: 1px solid var(--td-component-border);
    border-left: none;
    border-bottom: none;
  }

或者表格的单元格都用outline,取消border,这样就没有1px错位

.t-table th,
.t-table td {
    outline: 1px solid var(--td-component-border);
    border-left: none;
    border-bottom: none;
}

提问我就不删除了,留一个方案参考吧

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Wesley-0808
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant