我想知道如何隱藏連接的面板,只有在瀏覽器窗口左側顯示紅色按鈕,當我點擊紅色按鈕才能顯示整個面板。如果我再次點擊紅色按鈕,面板會在瀏覽器窗口左側再次消失?用jQuery隱藏和顯示面板
我知道我應該使用與相對定位包裝DIV絕對定位,但是這是我所有的想法...
<div class="wrapper"><div id="panel"></div><!-- #panel --><p>content</p></div><!-- .wrapper -->
.wrapper {position: relative; margin: 0 auto; width: 800px; height: 500px;}
#panel {position: absolute; left: -150px; top: 50px;}
有用的答案,豎起大拇指。因爲這是第一個正確的答案,我會選擇它作爲接受的答案。非常感謝,現在我對這個面板隱藏的東西有一個線索。 –
+1爲你努力提供示例 –