效果是mouseover缓慢放大之后mouseout缓慢缩小,下面的代码不知道问题出在哪里,望大神指导
时间: 2016-08-09来源:开源中国
前景提要
HDC调试需求开发(15万预算),能者速来!>>> <!doctype html><html> <head> <meta charset="utf-8"> <title>无标题文档</title> <style> #wed{ width:270px; height:480px;border:1px solid rgba(153,153,153,1);background-image:url(123.JPG)} </style> </head> <body> <div id="wed" onMouseOver="bigg()" onMouseOut="smal()"> </div> <script> var wed=document.getElementById("wed"); /**/ var timer="" function bigg(){ clearInterval(timer); timer=setInterval(bigt,30) } function bigt(){ if(wed.offsetWidth<=540 && wed.offsetHeight<=960){ wed.style.width=wed.offsetWidth+9+"px"; wed.style.height=wed.offsetHeight+16+"px"; } } function smal(){ clearInterval(timer); timer=setInterval(smal,30) } function smag(){ if(wed.offsetWidth>270 && wed.offsetHeight>480){ wed.style.width=wed.offsetWidth-9+"px"; wed.style.height=wed.offsetHeight-16+"px"; } } </script> </body> </html>

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行