当前位置: 首页 > Web前端 > HTML

el-table修改css取消行悬停高亮问题(设置fixed后取消高亮问题)

时间:2023-03-28 14:19:40 HTML

问题:使用el-table设置右侧固定列,因为item需要取消高亮的therowwhenhover的效果,查找方法如下//Normaltable::v-deep.el-tabletbodytr:hover>td{background-color:transparent!important;}//右固定table::v-deep.el-table__fixed-righttbodytr:hover>td{//右侧固定背景颜色:透明!important;}通过以上设置,确实可以达到一定的效果。hover时部分表格没有高亮显示,不尽如人意,于是重新找到下面的方法解决问题::v-deep.el-table.el-table__bodytr.hover-row>td{background-color:#ffffff!important}::v-deep.el-tablle--enable-row-hover.el-table__bodytr:hover>td{background-color:#ffffff!important}通过以上设置,既是普通表格而右边的固定列表已经达到了想要的效果,hover不会出现行高亮的效果,至此解决问题。