<!doctype html><html><head> <meta charset="UTF-8"> <title>下拉菜单</title> <style type="text/css"> .bbb { width: 200px; height: 200px; background: red; } </style> <script type="text/javascript"> window.onload = function(){ var obj= document.getElementById("divselect"); setInterval(function(){ console.log("obj.style.width:"+obj.style.width+ "obj.offsetWidth:"+obj.offsetWidth); obj.style.width = obj.offsetWidth - 1 + "px"; },30); } </script></head><body> <div id="divselect"> </div></body></html>
添加回答
举报
0/150
提交
取消