Align div with fixed position on the right side

后端 未结 8 1338
名媛妹妹
名媛妹妹 2021-02-02 08:08

I want to show a div which is always visible even as the user scrolls the page. I have used the CSS position: fixed; for that.

Now I also want

8条回答
  •  攒了一身酷
    2021-02-02 08:26

    You can simply do this:

    .test {
      position: -webkit-sticky; /* Safari */
      position: sticky;
      right: 0;
    }
    

提交回复
热议问题