好吧,所以我試圖建立一個右側頁面滑動效果與兩個狀態,在滑動面板的初始打開我想顯示菜單和選擇菜單項我想擴大箱子開放更大,並顯示該信息。從右側的頁面滑動
發現它很難準確描述我正在嘗試做什麼,因爲我之前沒有看到它,但幾乎在打開第一個div時,它的高度爲100px,寬度爲200px,在選擇右邊的動畫時該容器中的一個鏈接,我希望它擴大另一個div浮到它的左側,並擴大出更多的框。這有意義嗎?在別的地方也這樣或一些JavaScript得到這個工作的任何鏈接,將不勝感激......我的繼承人至今編碼:
HTML:
<div id="enquirypost">
<div style="width:200px;">
<a href="#extra" style="color:#999; text-decoration:underline;">Extra Expand</a>
<br />
<br />
Menu<br />
<a href="#" style="color:#fff; text-decoration:none;">Close</a>
</div>
<div id="extra">test</div>
</div>
<a href="#enquirypost" style="color:#999; text-decoration:underline;">Login/Register</a>
CSS:
body{margin:0;}
#enquirypost {
height:100%;
overflow:hidden;
z-index:1000;
width:0px;
float:right;
background:#ccc;
font-size:20px;
line-height:65px;
position:absolute;
top:0px;
right:0px;
color:#FFF;
text-align:center;
-webkit-transition:all 0.5s ease;
-moz-transition:all 0.5s ease;}
#enquirypost:target
{
bottom:0px;
overflow:auto;
min-width:200px;
height: 100%;
-webkit-transition:all 0.5s ease;
-moz-transition:all 0.5s ease;
}
#extra {
height:100%;
overflow:hidden;
z-index:1000;
width:0px;
float:right;
background:#000;
font-size:20px;
line-height:65px;
position:absolute;
top:0px;
right:0px;
color:#FFF;
text-align:center;
-webkit-transition:all 0.5s ease;
-moz-transition:all 0.5s ease;}
#extra:target
{
bottom:0px;
overflow:auto;
min-width:400px;
height: 100%;
-webkit-transition:all 0.5s ease;
-moz-transition:all 0.5s ease;
}
並繼承人jsfiddle