<div class="label-panel"
style="margin-left: -1720px;margin-top: 1010px;width: 3141px;height: 922px">
<div class="panel-main">
<div class="panel-img-container" id="panel-img-container"
style="position : absolute; width: 2160px;height: 993px;background-size: 2425px 1085px;">
<img src="../static/img/building/qita.jpg" alt="">
</div>
<div class="panel-content" style="position : absolute;">
<div class="panel-title" style="position : absolute;margin-left: 970px">其他</div>
<div class="panel-desc">
<div class="desc-main"
style="position : absolute; margin-top: 155px; margin-left: 970px;font-size: 50px;line-height: 55px">
以五到十年内群众业务办
</div>
</div>
</div>
</div>
</div>
这个是代码,我要怎么才能实现父div改变大小以后,子div大小跟着改变呀,他们都有各自的一些属性![](https://img2022.cnblogs.com/blog/2355131/202204/2355131-
就是组合成这样一张图20220412154632623-839132927.png)
子div设置width height 100%; 父div设置定位position: relative;