如果完全滚动,则第一列标题是固定的

时间:2018-03-26 18:17:18

标签: css

我遇到这个问题,如果我向下滚动,第一个列标题只有在完全滚动时才会被修复,但如果没有,则标题下一列值是可见的,请看截图我的意思。

以下代码:

<style lang="scss">
.sales-total{
.ui-dialog-graph-table{
    tbody > tr:last-child {
        pointer-events: none;
    }
    .ui-table-header-cell:first-child{
        background: #dbb100;
        position: sticky;
        left: 0;
        overflow: hidden;
        white-space: nowrap;
        z-index: 1000;

    }
    tbody tr:nth-child(even) td:first-child{
        background-color:#ddd;
        position: sticky;
        left: 0;
        overflow: hidden;
        white-space: nowrap;
        z-index: 1000;
    }
    tbody tr:nth-child(odd) td:first-child{
        background-color:#fff;
        position: sticky;
        left: 0;
        overflow: hidden;
        white-space: nowrap;
        z-index: 1000;
    }
}
}

第一行已为此修复。 fully scrolled half scroll

0 个答案:

没有答案
相关问题