最近在写elment-ui样式表格中遇到了溢出隐藏的问题,确实在控制台找了好久,比较麻烦
在没有设置之前
设置之后
上代码
/deep/.el-table tbody tr:hover>td {
background-color: #242133 !important;
position: relative;
}
/deep/.el-table__body-wrapper {
overflow: visible !important;
}
/deep/.el-table .cell{
overflow: visible !important;
}
/deep/.el-table{
overflow: visible !important;
}
.tableEditBtn {
p {
position: absolute;
right: 25px;
bottom: -20px;
z-index: 999;
button {
display: block;
width: 110px;
height: 40px;
background: #3A3949;
color: #F7F6FD;
border: none;
outline: none;
}
}
}
备注:
p标签里面包的按钮,p标签在加相对定位的时候,一定要加z-index属性,让他的层级大于el-table的层级
完美解决,你们还遇到过哪些问题(⊙o⊙)?