cssRules
css.cssRules ?
(css.insertRule(key + "{" + value + "}", css.cssRules.length)) :
(css.addRule(key, value));
老师这是处理兼容么 在网上搜不到 可以介绍我相关的书籍么
css.cssRules ?
(css.insertRule(key + "{" + value + "}", css.cssRules.length)) :
(css.addRule(key, value));
老师这是处理兼容么 在网上搜不到 可以介绍我相关的书籍么
2016-02-21
interface CSSRule {
const unsigned short STYLE_RULE = 1;
const unsigned short CHARSET_RULE = 2; // Obsolete
const unsigned short IMPORT_RULE = 3;
const unsigned short MEDIA_RULE = 4;
const unsigned short FONT_FACE_RULE = 5;
const unsigned short PAGE_RULE = 6;
const unsigned short KEYFRAMES_RULE = 7;
const unsigned short KEYFRAME_RULE = 8;
const unsigned short NAMESPACE_RULE = 10;
const unsigned short COUNTER_STYLE_RULE = 11;
const unsigned short SUPPORTS_RULE = 12;
const unsigned short DOCUMENT_RULE = 13;
const unsigned short FONT_FEATURE_VALUES_RULE = 14;
const unsigned short VIEWPORT_RULE = 15;
const unsigned short REGION_STYLE_RULE = 16;
readonly attribute unsigned short type;
attribute DOMString cssText;
readonly attribute CSSRule? parentRule;
readonly attribute CSSStyleSheet? parentStyleSheet;
};
css的接口
举报