CSS优先级 : 顺序 自上而下↓
!Important 权重最高
行内样式 <p style="color:red">
id {}
class {}
p {}
外联样式 link="xxxx.css"
- 如果优先级相同,则选择最后出现的样式。
- 继承得到的样式的优先级最低。
CSS优先级 : 顺序 自上而下↓
!Important 权重最高
行内样式 <p style="color:red">
id {}
class {}
p {}
外联样式 link="xxxx.css"