快捷导航

这个JavaScript的淡入淡出为什么无法实现?

#div1{width: 200px; height: 200px; background-color:red; filter: alpha(opacity:30); opacity: 0.3;}                <script type="text/javascript">        window.onload = function()        {                var oDiv1 = document.getElementById('div1');                oDiv1.onmouseover = function()                {                        startMove(100);                }                oDiv1.onmouseout = function()                {                        startMove(30);                }        }                var timer = null;                var alpha = 30;                function startMove(iTarget)                {                        var oDiv1 = document.getElementById('div1');                        clearInterval(timer);                        timer = setInterval(function()                        {                                var speed = 0;                                if (alpha

免责声明:本内容仅代表回答者见解不代表本站观点,请谨慎对待。

版权声明:作者保留权利,不代表本站立场。

回复

使用道具 举报

参与会员1

写代码要认真点....
回复

使用道具 举报

可能感兴趣的问答

发新帖
  • 微信访问
  • 手机APP