1 。 在利用js是我们不想再行间距中加入样式,但是必须用到style 怎么办?解决方案登场
currentStyle 和computedStyle(为了兼容性)
var style = window.getComputedStyle("元素", "伪类");
var dom = document.getElementById("test"), style = window.getComputedStyle(dom , ":after");
1 。 在利用js是我们不想再行间距中加入样式,但是必须用到style 怎么办?解决方案登场
currentStyle 和computedStyle(为了兼容性)
var style = window.getComputedStyle("元素", "伪类");
var dom = document.getElementById("test"), style = window.getComputedStyle(dom , ":after");