React Table 结束 SideBar

React Table is over SideBar

边栏上是否有任何 css 属性,或 div,或 table,打开时我想在边栏下方发送我的内容?

我正在使用 react-data-table-组件。

边栏上的数据表:

数据表Css:

#RTable-7 {
    text-align: center;
    font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    border: 3px solid #ddd;
    width: 100%;
}

#RTable-7 td, #RTable-7 th {
    border: 1px solid #ddd;
    padding: 8px;
}

#RTable-7 tr:nth-child(even){background-color: #f2f2f2;}

#RTable-7 tr:hover {
    /* background-color: #ddd; */
    background-color: #eea2a2;
}

#RTable-7 th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    background-color: #4CAF50;
    color: white;
}

边栏Css:

.navbar {
    background-color: #060b26;
    height: 80px;
    display: flex;
    justify-content: start;
    align-items: center;
}

.nav-menu {
    background-color: #060b26;
    width: 250px;
    height: 100vh;
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    left: -100%;
    transition: 850ms;
}
  
.nav-menu.active {
    left: 0;
    transition: 350ms;
    position: absolute;
}

您需要给 .nav-menuz-index 值一个高于 table 的值。试试这个

.nav-menu {
    z-index: 10 !important; // increase it if 10 doesn't work
}