萧萧公子的部落格 » 日志 » 幻灯片代码(NEW)!
幻灯片代码(NEW)!
Thinker 发表于 2006-07-11 13:13:34
对没有相册的小歪用户特别值得推荐。
效果可看本BLOG首页相册之"美人如玉"
以下是源代码:
<script language="JavaScript">
if (document.all){
document.write('<img src="图片地址" id="box">');
}
//-->
</script></CENTER>
<script language="JavaScript">
<!--
if (document.all){
pics=new Array("图片地址1","图片地址2","图片地址3","图片地址4","图片地址5")//后面可任意增加
//Transition speed. 4000 = 4 seconds etc.
delay=4000;
//Nothing needs altering paste here.
l=new Array()
for (i=0; i < pics.length;i++){
l[i]=new Image()
l[i].src=pics[i]
}
n="progid:DXImageTransform.Microsoft.";
f=new Array()
f[0]="Wheel(spokes=4)";
f[1]="Blinds(Bands=10,direction=up)";
f[2]="Stretch(stretchstyle=PUSH)";
f[3]="Stretch(stretchstyle=SPIN)";
f[4]="RadialWipe(wipestyle=RADIAL)";
f[5]="RadialWipe(wipestyle=WEDGE)";
f[6]="Checkerboard(Direction=right,SquaresX=8,SquaresY=8)";
f[7]="Fade(Overlap=1.00)";
f[8]="GradientWipe(GradientSize=0.25,wipestyle=0,motion=forward)";
f[9]="Iris(irisstyle=CIRCLE,motion=out)";
f[10]="Iris(irisstyle=STAR,motion=out)";
f[11]="Barn( motion=out,orientation=vertical)";
f[12]="Barn( motion=in,orientation=vertical)";
f[13]="Strips(motion=leftup)";
f[14]="Slide(slidestyle=HIDE,Bands=1)";
f[15]="Slide(slidestyle=PUSH,Bands=1)";
f[16]="Slide(slidestyle=SWAP,Bands=1)";
f[17]="RandomDissolve(duration=1)";
imgstep=0;
function ani(){
rnd=f[Math.floor(Math.random()*f.length)]
box.style.filter=n+rnd;
box.filters[0].apply();
box.src=l[imgstep].src;
box.filters[0].play();
imgstep++;
if (imgstep >= l.length) imgstep=0;
setTimeout("ani()",delay);
}
window.onload=new Function("setTimeout('ani()',delay)")
}
//-->
</script>
- » 我想爱你长长久久
- » [置顶]blog导航/说明
- » 我这人儿有点妙~
- » 歪酷blog
- » 湿。流浪
最新评论
-
2006-05-12 10:02:15 http://meimei.ycool.com/
应该是个姐姐吧,好强哟!
不过,我学不会那个留言板,我不知道该放在哪点? -
2006-06-19 17:49:28 http://lucin.ycool.com/
呀。。那样能播放吗。我好像似不了呢。
-
2006-06-20 11:57:18 http://fydeng.ycool.com/
应该没问题,可是要自己修改图片的路径,因为要用自己的图片嘛。
-
2006-06-22 09:38:03
修改图片的路径??有点太懂。把那个网页下载下来。接着上传到哪了?
-
2006-10-12 15:40:26
真的不错!如果每张图片能够单独链接到一个地址,那就更好了
-
2006-10-14 10:56:29
每张图片必须指向是一个合法的Internet地址,本地图片地址的反而不行。可以引用现成的网上图片地址!!!
-
2007-06-05 22:47:28 匿名 124.203.*.* http://www.yeaker.com
http://www.yeaker.com 这个网站帮你生成幻灯片,不用你懂代码,轻松几步就生成

