|
透明渐变轮番显示
点 击 预 览 效 果 页 面...... 图片以透明渐变轮番显示的脚本效果,过去也有过类似的,可是 不能任意的定制增减图片的数量,这次的是完美的。 制作方法: 在<head>标签下,粘贴代码: <SCRIPT LANGUAGE="JavaScript"> // 设置轮番显示速度 Set slideShowSpeed (milliseconds) var slideShowSpeed = 5000; // 匀滑转换时间 Duration of crossfade (seconds) var crossFadeDuration = 3; // 指定图像文件 Specify the image files var Pic = new Array(); // to add more images, just continue // the pattern, adding to the array below
Pic[0] = '1.jpg' Pic[1] = '2.jpg' Pic[2] = '3.jpg' Pic[3] = '4.jpg' Pic[4] = '5.jpg'
// do not edit anything below this line var t; var j = 0; var p = Pic.length; var preLoad = new Array(); for (i = 0; i < p; i++) { preLoad = new Image(); preLoad.src = Pic; } function runSlideShow() { if (document.all) { document.images.SlideShow.style.filter="blendTrans(duration=2)"; document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; document.images.SlideShow.filters.blendTrans.Apply(); } document.images.SlideShow.src = preLoad[j].src; if (document.all) { document.images.SlideShow.filters.blendTrans.Play(); } j = j + 1; if (j > (p - 1)) j = 0; t = setTimeout('runSlideShow()', slideShowSpeed); } </script> 修改body: <body bgcolor="#FFFFFF" text="#000000" onLoad="runSlideShow()"> 将表格单元格设置名称“id=VU”: <td id=VU> 在&l [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页
|