注册 登录
编程论坛 JavaScript论坛

[求助]动态网页编写图片渐入渐出效果怎么实现?

fish7fish7 发布于 2008-12-07 15:23, 2665 次点击
就是filter的blendtrans怎么用?
3 回复
#2
fish7fish72008-12-07 15:33
急求,难道没有知道的吗?不会吧!!!
#3
bygg2008-12-07 19:54
<html>
<head><title>jpg Test</title></head>
<body onLoad="fade()">
<img src="./images/test.jpg" name="u" border=0
alt="Image" style="filter:alpha(opacity=0)">
<script language="JavaScript">

var b = 1;
var c = true;

function fade(){
if(document.all);

if(c == true) {
b++;
}
if(b==100) {
b--;
c = false
}

if(b==10) {
b++;
c = true;
}

if(c == false) {
b--;
}
u.filters.alpha.opacity=0 + b;
setTimeout("fade()",50);
}
</script>
</body>
</html>
1