88、图片连续滚动效果

88、图片连续滚动效果

脚本说明:

把如下代码加入<body>区域中

<script type="text/javascript">

//Generate transition CSS (transition=0 to 23)

document.write('<STYLE TYPE="text/css">.imgTrans{ filter:revealTrans(duration=0.4,transition=12) }</STYLE>');

 

//Uncomment the next line for fading rollovers instead of dissolving:

//document.write('<STYLE TYPE="text/css">.imgTrans{ filter:blendTrans(duration=0.4) }</STYLE>');

 

var onImages=new Array();

function Rollover(imgName, imgSrc)

{

       onImages[imgName] = new Image();

       onImages[imgName].src = imgSrc;

}

 

function turnOn(imgName){

       if(document.images[imgName].filters != null)

              document.images[imgName].filters[0].apply();

       document.images[imgName].offSrc = document.images[imgName].src;

       document.images[imgName].src    = onImages[imgName].src;

       if(document.images[imgName].filters != null)

              document.images[imgName].filters[0].play();

}

 

function turnOff(imgName){

       if(document.images[imgName].filters != null)

              document.images[imgName].filters[0].stop();

       document.images[imgName].src = document.images[imgName].offSrc;

}

 

//Specify name of participating images, plus paths to their onMouseover replacements:

Rollover("home",  "home_on.gif");

Rollover("about", "about_on.gif");

Rollover("scripts", "scripts_on.gif");

 

</script>

<a href = "http://www.7stk.com"

onMouseOver="turnOn('home');"

onMouseOut="turnOff('home');"><img name="home" class="imgTrans"

src="home_off.gif" border="0"></a><br>

 

<a href = "http://www.7syg.com/"

onMouseOver="turnOn('about');"

onMouseOut="turnOff('about');"><img name="about" class="imgTrans"

src="about_off.gif" border="0"></a><br>

 

<a href = "http://www.dynamicdrive.com/new.htm"

onMouseOver="turnOn('scripts');"

onMouseOut="turnOff('scripts');"><img name="scripts" class="imgTrans"

src="scripts_off.gif" border="0"></a><br>

Write a comment

Comments: 0