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.
目前我正在做一些非常讨厌的计算来获取<select>元素的实际宽度。它有边框、填充、边距等。jQuery 的 outerWidth() - innerWidth() 几乎没有给我我想要的东西。有没有人遇到过这种类型的问题?似乎它实际上很常见。
<select>
试试这个jQuery 插件,它可以让您获得元素的计算 CSS,并可能有助于解决您的问题。