<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>实践题 - 选项卡</title> <style type="text/css"> div{ width:200px; height:200px; background:red; } </style> <script type="text/javascript"> window.onload=function(){ startMove(); } function startMove(){ setInterval(function(){ var oDiv=document.getElementById("div1"); oDiv.style.width=oDiv.offsetWidth-1+'px' },30) } </script> </head><body><div id="div1"></div> </body></html>
添加回答
举报
0/150
提交
取消