これは古い答えですが、最近それを探している人は、bgshuffleスクリプトを試すことができます。JqueryUIを使用します。ページのどこかにJqueryUIを含める必要があります。スクリプトはgithubに投稿されています。必要に応じて、自由に拡張してください。
https://github.com/vikaskumarsingh123/bgshuffle/
あなたは単にそれを次のように呼ぶことができます:
shuffleBG( ['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg'] );//the array of wallpapers
または高度な使用法:
shuffleBG(['1.jpg','2.jpg','3.jpg','4.jpg','5.jpg'], //the array of wallpapers
'10000', //time between wallpaper change, defaults to 10000ms (10secs)
'1000', //fade in fade out animation speed, defaults to 1000ms
'white' //color to fade in and out of, defaults to body backgroundColor or white
);
通常、この関数はdocument.loadで呼び出します。