Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想获得一个<xul:hbox>元素的实际宽度以进行演示。我怎么才能得到它?我看到 HTML 元素具有 offsetWidth 属性,但我在 XUL 元素中找不到此属性
<xul:hbox>
使用element.getBoundingClientRect()或更旧的element.boxObject.width.
element.boxObject.width