JavaScript中offsetWidth的bug及解决方法 offsetWidth表示对象的可见宽度。比如:#div1{width:100px;height:200px;background:red;}结果:100#div1{width offsetWidth