el-table样式问题:如何修改element-ui表格中按钮悬浮显示但是被el-table溢出隐藏的问题?

最近在写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⊙)?

猜你喜欢

转载自blog.csdn.net/lqlq54321/article/details/110817599