How can I create different levels of sticky headers?

前端 未结 2 966
执笔经年
执笔经年 2020-12-02 01:08

I\'d like an elegant way to \"collect\" multi-level headers at the top of the window as the user scrolls, and position:sticky gets me 90% of the way there. The

2条回答
  •  忘掉有多难
    2020-12-02 01:40

    You need to use the 'z-index' tag in order to do so. First header should have lower z-index value than any other header. The last header should have the highest z-index value. z-index tag is used to put the elements below or above any other elements.

提交回复
热议问题