CSS to keep element at “fixed” position on screen

后端 未结 11 1443
旧巷少年郎
旧巷少年郎 2020-12-04 23:22

I\'m looking for a trick to create a \"fixed\" HTML object on the browser screen using CSS. I want it to stay in the same position all the time, even when the user scrolls t

11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 23:53

    position: fixed;

    Will make this happen.

    It handles like position:absolute; with the exception that it will scroll with the window as the user scrolls down the content.

提交回复
热议问题