正文火狐下不能使用非行间样式currentStyle用getComputedStyle获取IP云V管理员/2022-09-08/0 阅读 09/08小程序:扫一扫查出行【扫一扫了解最新限行尾号】复制小程序 用js的style属性可以获得html标签的样式,但是不能获取非行间样式。那么怎么用js获取css的非行间样式呢?在IE下可以用currentStyle,而在火狐下面我们需要用到getComputedStyle。下面是一个小示例: