美文网首页
获取元素的css属性值getComputedStyle()

获取元素的css属性值getComputedStyle()

作者: 胖太_91bf | 来源:发表于2017-12-22 15:34 被阅读0次

document.defaultView.getComputed(el, null)

getComputedStyle是一个可以获取当前元素所有最终使用的CSS属性值。返回的是一个CSS样式声明对象([object CSSStyleDeclaration]),只读

相关文章

网友评论

      本文标题:获取元素的css属性值getComputedStyle()

      本文链接:https://www.haomeiwen.com/subject/dwxxgxtx.html