1
滑動由中心來,因爲我已經給width:100%; left: 50%; .
jQuery的.animate()滑動問題
幻燈片是由左到右的到來,但我想這是從右到左開始。我懷疑這是一個CSS問題。我試着改變CSS,但沒有任何幫助。請有人找到這個錯誤,並幫我繼續。由於
CSS代碼:
.sidebar_list
{
float:left;
display: none;
position: fixed;
width:100%;
top: 57px;
bottom: 0px;
left: 50%;
right: 0px;
overflow: hidden;
line-height: 2em;
border-left: 1px solid black;
border-bottom: 1px solid black;
padding: 10px;
height: 100%;
color: #ffffff;
background: #33B5E5;
}
$(".logo").click(function()
{
$(".sidebar_list").animate({
width: 'toggle'
}, 200)
});
也許[這個以前的答案](http://stackoverflow.com/a/16208453/3433782)可幫助您 – aedips