sticky 布局 (已经成熟)
.content{
    min-height: 100vh;
    padding-bottom: 100px;
}
.footer{
    height: 100px;
    position: sticky;
    bottom: 0;
}
1.父元素及祖先元素不能overflow:hidden或者overflow:auto属性。
2.必须指定top、bottom、left、right4个值之一,否则只会处于相对定位
3.父元素的高度不能低于sticky元素的高度
4.sticky元素仅在其父元素内生效

相关文章:

  • 2022-12-23
  • 2021-07-23
  • 2022-01-25
  • 2021-08-29
  • 2022-01-06
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
猜你喜欢
  • 2021-09-08
  • 2021-09-15
  • 2022-01-11
  • 2021-08-17
  • 2021-05-20
相关资源
相似解决方案