We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
第96天 行内css和important哪个优先级高?
!important 将覆盖行内css css优先级:行内css>id选择器(#)>伪类(:)>属性选择器([])>类选择器(.) > 类型选择器(div p a等) > 通用选择器(*)
!important 是最高级的吧
!important
css 权重(以256进制计算) !important Infinity 行间样式 1000 id 100 class/伪类/属性 10 元素/伪元素 1 通配符(*) 0
!important 优先级最高,权重可以认为是正无穷。
CSS 选择器的优先级: !important > 行内 > #id > .class > tag > *
特指度 ICE公式
<div style="background-color: violet !important;"></div>
鸡贼点
Activity
LinStan commentedon Jul 21, 2019
!important 将覆盖行内css
css优先级:行内css>id选择器(#)>伪类(:)>属性选择器([])>类选择器(.) > 类型选择器(div p a等) > 通用选择器(*)
NicholasBaiYa commentedon Jul 21, 2019
!important 是最高级的吧
haizhilin2013 commentedon Jul 21, 2019
!important
l8888888 commentedon Jul 21, 2019
css 权重(以256进制计算)
!important Infinity
行间样式 1000
id 100
class/伪类/属性 10
元素/伪元素 1
通配符(*) 0
Konata9 commentedon Aug 20, 2019
!important
优先级最高,权重可以认为是正无穷。CSS 选择器的优先级:
!important > 行内 > #id > .class > tag > *
seho-dev commentedon Nov 21, 2019
特指度
ICE公式
maxthonl commentedon Oct 30, 2020
鸡贼点