js计算li不换行的情况下,ul的宽度--用于做有滚动的导航条

      var lenght_li=0;
      $('.info_tab li').each(function(){
        lenght_li+=$(this).outerWidth(true);
      });
      $('.info_tab').css({
        'width':lenght_li+1
      });

  

 

posted @ 2017-04-09 22:32  ghfjj  阅读(817)  评论(0编辑  收藏  举报