Sticky top div with absolute positioning

后端 未结 6 1534
温柔的废话
温柔的废话 2020-12-30 00:48

I\'m using absolute positioning to have a div fill up the entire browser window. However, I wan\'t to combine this with a sticky div that sometimes is there and sometimes no

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-30 01:17

    Use float: left; and width: 0; and you can use transform: translateX(xxx); for set left position.

    Problem solved :)

提交回复
热议问题