如何加速 Element.fade 函数

How to speed up Element.fade function

我想加快 fade() 函数的速度,但函数接受的参数是关于不透明度,而不是速度。我该怎么做?

谢谢

您可以设置新的补间持续时间,例如:

$('slow').set('tween', {duration: 5000});
$('fast').set('tween', {duration: 100});
$$('div').fade();
<script src="https://ajax.googleapis.com/ajax/libs/mootools/1.5.1/mootools-yui-compressed.js"></script>


<div id="slow">I'm going to fade slowly!</div>
<div id="normal">I'm going to fade normal speed!</div>
<div id="fast">I'm going to fade fast!</div>

jsFiddle: http://jsfiddle.net/8vjsfpfq/