样式
支持 css2 或者 css3
可用 document.implement.hasFeature();方法来判断
style属性
对于background-color通过属性访问时需要转化为backgroundColor
因为float是保留字所以访问对于除ie以外为cssFloat,IE为styleFloat
cssText 属性可以访问css代码
计算的样式
获得样式表中的样式,而不是元素中通过style获得道德
document.defaultView.getComputedStyle()参数为要获取样式的元素
访问border这样的综合属性一般不会返回一般是undefined
操作样式表
styleSheets包括link 和 style俩种
也可以通过link和style来获得CSSStyleSheet对象,有一个sheet属性,但是IE中的为styleSheet
link.sheet || link.styleSheet
规则
DOM insertRule()向样式表中添加新规则IE为addRule()
DOM deleteRule()删除规则IE removeRule()