当鼠标移动上去后,字慢慢的变大的 效果应该 如果实现啊
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>changeFont档 www.aspxhome.com</title> <script type="text/javascript"> var n = 12; function chanTxt() { var obj = document.getElementById("test"); if(n <= 42) { obj.style.fontSize = n+"px"; } n++; } </script> </head> <body>鼠标经过橙色部分 <div id="test" onmouseover="setInterval('chanTxt()',100)" style="width:300px; height:50px; font-size:12px; line-height:50px; background:#f90;">Asp之家欢迎你!</div> </body> </html> [提示:你可先修改部分代码,再按运行]