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.
我正在尝试通过 javascript/jQuery 获取所有计算的 css 属性,而无需浏览器细节。有没有办法做到这一点?
谢谢
是的,这是一个跨浏览器的示例:
这个例子很老了。您可能希望将其反转以getComputedStyle优先使用currentStyle.
getComputedStyle
currentStyle