优先级比较公式:
继承<通配符选择器<标签选择器<类选择器<id选择器<行内样式<!important
列举依次为:
(父级赐予)<*<(p)<(.box)<#<(标签内部style)<(background-color:pink !important;)
注意:!important不能提升继承的优先级
优先级比较公式:
继承<通配符选择器<标签选择器<类选择器<id选择器<行内样式<!important
列举依次为:
(父级赐予)<*<(p)<(.box)<#<(标签内部style)<(background-color:pink !important;)
注意:!important不能提升继承的优先级