gpt4 book ai didi

Jquery .show() - 显示的 div 下面的 div 不会向下滑动

转载 作者:行者123 更新时间:2023-11-28 14:03:01 24 4
gpt4 key购买 nike

我的 asp 页面中有 2 个 div

<div id="leftcolotherdestinations" style="display:none;">
<asp:Panel ID="pnlOtherDestinations" runat="server" CssClass="destinationpanel">
</asp:Panel>
</div>
<div id="leftcolheaderupdates">
Updates
</div>

#leftcolotherdestinations 在单击按钮时使用 jquery 显示。到目前为止没问题。但是当显示#leftcolotherdestinations 时,#leftcolheaderupdates 正在向下滑动,但是当动画结束时它会上升到之前的位置。我希望它与上面的 div 一起下降。这是我的 CSS;

#lefcoltotherdestinations
{
margin-top:20px;
display:block;
height:20px;
background-color:#D8D2CE;
}
#leftcolheaderupdates
{
display:block;
height:20px;
background-color:#D8D2CE;
}

最佳答案

我通过移除外部 div 中的 float 元素(或使它们“不 float ”)解决了这个问题。感谢评论。

关于Jquery .show() - 显示的 div 下面的 div 不会向下滑动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10172714/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com