var color = window.getComputedStyle( document.querySelector('.element'), ':before').getPropertyValue('color');var content = window.getComputedStyle( document.querySelector('.element'), ':before').getPropertyValue('content');
myDiv.classList.add('myCssClass');
myDiv.classList.remove('myCssClass');
myDiv.classList.toggle('myCssClass');
function addCSSRule(sheet, selector, rules, index) { if(sheet.insertRule) {
sheet.insertRule(selector + "{" + rules + "}", index);
} else {
sheet.addRule(selector, rules, index);
}
}
addCSSRule(document.styleSheets[0], "header", "float: left");
curl(
[ "namespace/MyWidget", "css!namespace/resources/MyWidget.css"
],
function(MyWidget) {
}
});
.disabled { pointer-events: none; }
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |