Get width in pixels from element with style set with %?

后端 未结 7 1622
庸人自扰
庸人自扰 2021-01-31 00:57

I have this element:

I want to get it\'s width in pixels. I just tried this:

7条回答
  •  离开以前
    2021-01-31 01:41

    yourItem.style['cssProperty']
    

    this way you can call the property string dynamically

提交回复
热议问题