这个导航滑块在鼠标移开都会自动归位,如何能让滑块停在最后的位置呢
http://css-tricks.com/examples/MagicLine/

解决方案 »

  1.   

    事件绑定为mouseover就可以了,比如demo1,修改js文件:
        $("#example-one li").find("a").mouseover(function() {
            $el = $(this);
            leftPos = $el.position().left;
            newWidth = $el.parent().width();
            $magicLine.stop().animate({
                left: leftPos,
                width: newWidth
            });
        });
      

  2.   

    原理这样 晕了一段时间后,感觉js css什么的也没那么神秘难搞了