We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
以下是权重的规则:标签的权重为1,class的权重为10,id的权重为100
/*权重为1*/ div{ } /*权重为10*/ .class1{ } /*权重为100*/ #id1{ } /*权重为100+1=101*/ #id1 div{ } /*权重为10+1=11*/ .class1 div{ }
相同权重下:内联(标签内部) > 嵌入(当前文件<style>) > 外部(外部文件) !important > id > class > tag
!important优先级高于内联
The text was updated successfully, but these errors were encountered:
No branches or pull requests
一、CSS定义的权重
以下是权重的规则:标签的权重为1,class的权重为10,id的权重为100
二、优先级
相同权重下:内联(标签内部) > 嵌入(当前文件<style>) > 外部(外部文件)
!important > id > class > tag
The text was updated successfully, but these errors were encountered: