Mootools公司-资产。图像
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mootools公司-资产。图像相关的知识,希望对你有一定的参考价值。
This snippet assumes that you have a container `div` with an id of "images".It also assumes that each img element inside your container div has the CSS property `visibility: hidden`
var loadImages = function(strSelector) { var arrImages = $(strSelector).getElements('img'); var arrSources = []; arrImages.each(function(eleImage) { arrSources.push(eleImage.get('src')); }); new Asset.images(arrSources, { onComplete: function() { var objChain = new Chain; arrImages.each(function(eleImage) { objChain.chain(function() { eleImage.set('tween', { duration: 300 }).tween('opacity', 0, 1); this.callChain.delay(100, this); }); }); objChain.callChain(); } } ); } window.addEvent( 'domready', function() { loadImages( $('images') ); } );
以上是关于Mootools公司-资产。图像的主要内容,如果未能解决你的问题,请参考以下文章