更新时间:2023-11-01 21:21:16
#inside
div设置了height
属性.如果删除它,您将获得想要的行为.
The #inside
div has an height
property set. If you remove it, you'll get the behaviour you want.
编辑
似乎您正在通过javascript设置height
属性,以便使div的height
动画.
It seems you're setting the height
property via javascript in order to animate the div's height
.
在这种情况下,动画制作完成后,可以将height
设置为auto
,这样#inside
div将尊重其子级height
并正确展开.
In this case, after animation's been completed, you could set the height
to auto
, so the #inside
div will respect its children's height
and expand correctly.
$pageWrap.animate({
height: baseHeight + $mainContent.height() + "px"
}, {
complete: function(){
$(this).css('height', 'auto');
}
});