2011-11-02 111 views

回答

0

如果這應該像一個常規下拉菜單,只有菜單項不在線上,那麼是的,這是可能的。你可以使用正常的菜單,並使用jQuery來移動位置或填充。

0

這將是一個解決方案:

$('ul.menu li').each(function() { 
    var marginLeft = 0; // start margin left position in pixels 
    var stapLeft = 50; // pixels 

    // looping through every li item underneave a ul in the list 
    $(this).find('ul li').each(function() { 
     // set the margin for the element 
     $(this).css(marginLeft, marginLeft); 
     // set for the next item the margin 
     marginLeft += stapLeft; 
    }); 
}); 

但有defently一個更好的方式來做到這一點:)它只是把你指向的方向