How can I have a position: fixed; behaviour for a flexbox sized element?

前端 未结 5 1652
醉梦人生
醉梦人生 2020-12-02 10:09

I have a div called .side-el which I would like to have in a position: fixed; behavior, but as soon as I apply position fixed the width alternates from the right one. The ri

5条回答
  •  离开以前
    2020-12-02 10:57

    You can achieve it with a css alternative position: sticky

    It acts great but the only problem is browser support (June 2018): https://caniuse.com/#feat=css-sticky

    Hope it gets better soon.

提交回复
热议问题