首 页免费资源建站技术源码下载软件下载精品淘吧客户留言
用户登陆 | 用户注册
您当前的位置:笃志小屋建站技术特效代码图形图像 → 文章内容
图片的渐显播放
作者:佚名  来源:不详  发布时间:2007-9-30 8:48:21

图片的渐显播放



<!-- 要实现此效果需要 3 个步骤: -->

<!-- 第 1 步: -->
<!-- 把下面的代码加到<HEAD></HEAD>区域中: -->

<script language=javascript>
<!--//
sandra0 = new Image();
sandra0.src = "../images/webasp.net.1.jpg";
sandra1 = new Image();
sandra1.src = "../images/webasp.net.2.jpg";
sandra2 = new Image();
sandra2.src = "../images/webasp.net.3.jpg";
var i_strngth=1
var i_image=0
var imageurl = new Array()
imageurl[0] ="../images/webasp.net.1.jpg"
imageurl[1] ="../images/webasp.net.2.jpg"
imageurl[2] ="../images/webasp.net.3.jpg"
function showimage() {
if(document.all) {
if (i_strngth <=110) {
testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
i_strngth=i_strngth+10
var timer=setTimeout("showimage()",100)
}
else {
clearTimeout(timer)
var timer=setTimeout("hideimage()",1000)
}
}
if(document.layers) {
clearTimeout(timer)
document.testimage.document.write("<img src="+imageurl[i_image]+" border=0>")
document.close()
i_image++
if (i_image >= imageurl.length) {i_image=0}
var timer=setTimeout("showimage()",2000)
}
}
function hideimage() {
if (i_strngth >=-10) {
testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";
i_strngth=i_strngth-10
var timer=setTimeout("hideimage()",100)
}
else {
clearTimeout(timer)
i_image++
if (i_image >= imageurl.length) {i_image=0}
i_strngth=1
var timer=setTimeout("showimage()",500)
}
}
//-->
</script>




<!-- 第 2 步: -->
<!-- 把<BODY>中的属性代码改为: -->

<BODY onLoad="showimage()">



<!-- 第 3 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<div id="testimage" style="position:absolute;visibility:visible;top:120px;left:240px"></div>
2007-9-30 8:48:21免费资源duzhi.net

[ ] [返回上一页] [打 印]

【笃志小屋duzhi.net】

  技术文章导航
  技术文章排行
  精彩推荐
Copyright www.duzhi.net All Right Reserved.
设计制作:翼迅设计室 Equick Desgin Home 在线QQ:303471038
网络备案号:冀ICP备06008201号 站长信箱:webmaster#duzhi.net(将#换为@)
本站部分文章和图片来源于网络和内容提供伙伴,如果侵犯了您的权利,请留言告知,本站定会及时删除相关文件!