问题
In shiny rpivotTable
how can I freeze the header?
I know how to add a scroll bar in css to the pivot table, however I don't know how to freeze the header.
#PivotFinal {
overflow-y: scroll;
}
回答1:
I figured out how to do it, in the .css file I added the below code.
table.pvtTable thead th{
position: sticky;
position: -webkit-sticky;
top: 0;
z-index: 999;
}
来源:https://stackoverflow.com/questions/54484803/freeze-the-header-of-rpivottable-shiny