0
我有2周的div在我的ASP網頁jQuery的.show() - 所示的div下面的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;
}
你可以顯示一個[JS小提琴演示](http://jsfiddle.net/)或類似的,你正在使用什麼? – 2012-04-16 10:58:25
你在你的CSS中有一個錯字:它有選擇符'#lefcoltotherdestinations',但是你的HTML有'id'' leftcolotherdestinations'的div。在CSS中,'left'中的't'錯位(它在'col'後面)。有了這個固定的,它很好:http://jsbin.com/imujuw我會張貼這個答案,但它沒有說明你描述的症狀,所以... – 2012-04-16 10:59:00
這是工作,HTTP:///jsfiddle.net/ocanal/8qHc4/1/ – ocanal 2012-04-16 11:04:40