父元素设置position: relative

子元素设置position: absolute

然后给子元素设置left和top调整位置。当然也可以用margin-top和 margin-left来调;

CSS 父元素相对位置设置

相关文章:

  • 2021-05-27
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案