water-1

绝对定位居中,
position:absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
margin: auto;
绝对定位居中2,要求已知定位元素的宽和高


position:absolute;
        top: 50%;
left: 50%;
margin-top: -150px;
margin-left: -150px;
绝对定位3,未知定位元素的宽和高居中3
      position:absolute;
top: 50%;
left: 50%;
    transform:translate(-50%,-50%);

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
猜你喜欢
  • 2022-01-22
  • 2021-11-21
  • 2021-11-21
  • 2022-01-25
  • 2021-12-15
  • 2021-12-03
  • 2022-01-05
相关资源
相似解决方案