- <div style="height:100px; width:100px; background:#CCC; overflow:hidden;">
- <div style="height:300px; width:90px; background:#999; position:relative;"></div>
- </div>
- ↓
解决方案:将父标签的position也设置成relative,代码如下:
- <div style="height:100px; width:100px; background:#CCC; overflow:hidden; position:relative;">
- <div style="height:300px; width:90px; background:#999; position:relative;"></div>
- </div>
时间: 2024-10-26 07:08:40