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

后端 未结 7 1619
庸人自扰
庸人自扰 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 02:00

    This jQuery worked for me:

    $("#banner-contenedor").css('width');
    

    This will get you the computed width

    http://api.jquery.com/css/

    0 讨论(0)
提交回复
热议问题