2013-07-05 130 views
1

我有隱藏溢出內容/ div(#map_Marker_Check_Block)在另一個div內的問題。屏幕的中間幾乎是父母的位置。 div「map_Marker_Check_Block」的位置是正確的-12em。所以當用戶點擊這個div時,jquery播放動畫並將整個div滑動到右邊位置0.功能部分工作正常,只是隱藏#map_Marker_Check_Block div(15em-12em)的問題。請注意,因爲我需要y-scrolbar來查看隱藏div內容中的內容。hidding div溢出內容

HTML

<div id="map_Marker_Check_Block"> 
<div class="markerDiv" id="maker_school"> 
    <label class="marker_label">School</label> <input class= 
    "marker_ckeckbox" name="markerType" type="checkbox" value="school"> 
</div><br> 

<div class="markerDiv" id="maker_gym"> 
    <label class="marker_label">Gym</label> <input class="marker_ckeckbox" 
    name="markerType" type="checkbox" value="gym"> 
</div><br> 
</div> 

CSS

#sp_tab2 { 
position:relative; 
} 

#map_Marker_Check_Block { 
display:block; 
position:absolute; 
width:15em; 
height:400px; 
top:0; 
right:-12em; 
z-index:10; 
overflow-x:hidden; 
overflow-y:auto; 
} 

回答

1

啊啊啊!深夜工作,這是發生了什麼,我的錯。我想念溢出:父母標籤中隱藏的屬性。

#sp_tab2 { 
position:relative; 
overflow:hidden; 
}