如果要将绝对定位元素相对父元素定位,就必须设置父元素为相对定位,如:
<style type="text/css">
.a{position:relative;background:green;}
.b{position:absolute;right:0;top:0;background:red;}
</style>
<div class="a">父元素,net920com ,其它一些内容。<div class="b">子元素</div></div>

相关文章:

  • 2021-12-03
  • 2021-12-03
  • 2021-08-18
  • 2021-10-19
  • 2021-07-01
猜你喜欢
  • 2021-11-20
  • 2022-12-23
  • 2022-01-14
  • 2022-12-23
  • 2021-12-24
  • 2021-11-30
  • 2021-10-07
相关资源
相似解决方案