问答详情
源自:5-2 jQuery中动画animate(下)

这段代码不是很了解,这里面的now与fx并没有返回值为什么会有输出?

function(now, fx) {
                   $aaron.text('进度:'+arguments[1])
                     var data = fx.elem.id + ' ' + fx.prop + ': ' + now;
                 alert(data)

提问者:qq_yEs先生_53252576 2016-07-09 16:29

个回答

  • 攻城3707672
    2016-09-05 22:12:59

    now:当前改变的值,

    fx:里面自带很多:

    easing    字符串    动画方式"linear",swing,easeIn,easeOut...等    

    elem    DOM元素    正在动画的元素    

    end    数值    动画结束值    

    now    数值    动画当前值    

    options    对象    参数    

    options.duration    数值    传到动画动的duration    

     options.queue    字符串    动画队列    

    pos    数值    在动画过程中从0.0到1.0    

    prop    字符串    正在变化的css属性    

    start    数值    CSS属性开始变化的值    

    unit    字符串    CSS值的单位    


  • 上善o若水
    2016-07-09 22:29:56

    是这一行 $aaron.text('进度:'+arguments[1]) 输出的