gpt4 book ai didi

CSS声明覆盖

转载 作者:行者123 更新时间:2023-11-28 13:14:06 24 4
gpt4 key购买 nike

#header {
width:100%;
height:200px;
}

#theme.theme1 .handle {
background:blue;
}

#header.noback {
background:none;
}

为什么最后的声明不在这里覆盖?

http://jsfiddle.net/5VnAs

最佳答案

这是由于 CSS specificity 。如果将最后一条规则更改为

#header.noback.handle{ 
background:none;
}

jsFiddle example

有效

关于CSS声明覆盖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18176997/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com