CSS for Fixed Footer

后端 未结 4 817
日久生厌
日久生厌 2020-12-06 11:39

I have a pretty basic HTML page. The code looks like the following:


  
4条回答
  •  不知归路
    2020-12-06 12:09

    Use position: fixed instead of position: absolute.

    Why? This explains how they differ https://css-tricks.com/absolute-relative-fixed-positioining-how-do-they-differ/ I think in your case the problem is that the absolute element is attaching to the body, thus it will scroll with the body.

提交回复
热议问题