开发者

get style.width when property set with className

开发者 https://www.devze.com 2023-02-28 22:02 出处:网络
How开发者_JAVA百科 can you get the property style.width if it is set with className?It sounds like you need a node\'s computed width, which is its physical width after all styles are applied.

How开发者_JAVA百科 can you get the property style.width if it is set with className?


It sounds like you need a node's computed width, which is its physical width after all styles are applied.

See here for how.

As you can see, elementNode.offsetWidth appears to be the most portable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号