<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
#div1{width:200px;height:200px;filter:alpha(opacity:30);opacity:0.3;}
</style>
<script>
window. ()
{
var oDiv=document.getElementById('div1');
oDiv. ()
{
startMove(100);
};
oDiv. ()
{
startMove(30);
};
};
var timer=null;
var alpha=30;
function startMove(number)
{
var oDiv=document.getElementById('div1');
clearInterval(timer);
timer=setInterval(function ()
{
var speed=0;
if(alpha<number)
{
speed=5;
}
else
{
speed=-5;
}
if(alpha==number)
{
clearInterval(timer);
}
else
{
alpha+=speed;
oDiv.style.filter='alpha(opacity='+alpha+')';
oDiv.style.opacity=alpha/100;
}
},30);
};
</script>
</head>
<body>
</body>
<div id="div1">
<img src="file:///E|/250-chocolate-19-momme-seamless-silk-bedding-set-cymbidium-02.jpg" />
</div>
</html>
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。