Why does a dynamically added image always have an offsetWidth of 0

前端 未结 0 1018
清歌不尽
清歌不尽 2020-12-19 23:37

I am adding an image via Javascript.

The image could be of any size and I\'d like to get the size (width and height).

The issue is, the offsetWidth

相关标签:
回答
  • 消灭零回复
提交回复
热议问题