getPropertyValue (实现 js框架中 css 的最终调用的函数)

,取得元素最终计算出的css 样式

 

 var a = document.getElementById("content");
    alert("style "+a.style.color);
    alert("css "+window.getComputedStyle(a).getPropertyValue("color"));

posted @ 2017-03-24 17:38  善未易明  阅读(1431)  评论(0编辑  收藏  举报