css3 动画 阮一峰:如何实现这个网页效果

来源:百度文库 编辑:高校问答 时间:2024/05/09 06:25:52
用JAVASCRIPT如和实现图片渐隐效果.我这有一个,但我想当鼠标点击当前显示的图片时,可以打开相对的页面.如何实现连接的效果.

<SCRIPT LANGUAGE="JavaScript">
// 设置轮番显示速度 Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2500;
// 匀滑转换时间 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] = 'image/PIC_1.jpg'
Pic[1] = 'image/PIC_2.jpg'
Pic[2] = 'image/PIC_3.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[i] = new Image();
preLoad[i].src = Pic[i];
}
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>

<!--#include file="**.asp"-->
加入到代码中