<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效|Linkweb.cn/Js|--- 图片的切换</title>
</head>
<body>
<style type="text/css">
#img1 {position:absolute; width:140px; height:105px; left:220px;
top:125px; z-index:1; visibility:hidden;}
#img2 {position:absolute; width:140px; height:105px; left:220px;
top:125px; z-index:2}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var ie5=(document.getElementById && document.all);
var ns6=(document.getElementById && !document.all);
nPlus = 5 //the % of fading for each step
speed = 80 //速度
// You don't have to edit below this line
nOpac = 100
function FadeImg(){
if(document.getElementById){
document.getElementById('img1').style.visibility="visible";
imgs = document.getElementById('img2');
opacity = nOpac+nPlus;
nOpac = opacity;
setTimeout('FadeImg()',speed);
if(opacity>100 || opacity<0){
nPlus=-nPlus;
}
if(ie5){
imgs.style.filter="alpha(opacity=0)";
imgs.filters.alpha.opacity = opacity;
}
if(ns6){
imgs.style.MozOpacity = 0 + '%';
imgs.style.MozOpacity = opacity + '%';
}
}
}
onload=FadeImg;
// End -->
</script>
<div id="img1">
<img src="aa.jpg" border=0 width=140 height=105>
</div>
<div id="img2">
<img src="love.jpg" border=0 width=140 height=105>
</div>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网页特效|Linkweb.cn/Js|--- 图片的切换</title>
</head>
<body>
<style type="text/css">
#img1 {position:absolute; width:140px; height:105px; left:220px;
top:125px; z-index:1; visibility:hidden;}
#img2 {position:absolute; width:140px; height:105px; left:220px;
top:125px; z-index:2}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var ie5=(document.getElementById && document.all);
var ns6=(document.getElementById && !document.all);
nPlus = 5 //the % of fading for each step
speed = 80 //速度
// You don't have to edit below this line
nOpac = 100
function FadeImg(){
if(document.getElementById){
document.getElementById('img1').style.visibility="visible";
imgs = document.getElementById('img2');
opacity = nOpac+nPlus;
nOpac = opacity;
setTimeout('FadeImg()',speed);
if(opacity>100 || opacity<0){
nPlus=-nPlus;
}
if(ie5){
imgs.style.filter="alpha(opacity=0)";
imgs.filters.alpha.opacity = opacity;
}
if(ns6){
imgs.style.MozOpacity = 0 + '%';
imgs.style.MozOpacity = opacity + '%';
}
}
}
onload=FadeImg;
// End -->
</script>
<div id="img1">
<img src="aa.jpg" border=0 width=140 height=105>
</div>
<div id="img2">
<img src="love.jpg" border=0 width=140 height=105>
</div>
</body>
</html>
1917

被折叠的 条评论
为什么被折叠?



