有什么方法可以将其包含在children elements size whose position is absolute
其中parents size
,我的意思是说:
我们有 :
标记
<div class="parent">
<div class="children">
My position is absolute.
</div>
</div>
CSS
.parent // position by default static
{
width:100%;
height:auto;
}
.children
{
position :absolute;
width:100%;
height:auto;
}
我的问题是父母的高度是0,可能是因为它的孩子绝对定位。那么有什么解决方法吗?