Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 特定类的not()_Html_Css - Fatal编程技术网

Html 特定类的not()

Html 特定类的not(),html,css,Html,Css,假设有div的样式和更多的类- div, .exceptDiv, .bigDiv { /*style...*/ } 我想保存一个不受任何样式影响的类-clearDiv 我试过- div:not(".clearDiv"), .exceptDiv, .bigDiv { /*style...*/ } 但它不起作用 如果可能的话,我正在寻找一种使用而不是(…)的解决方案 正确使用not() div:not(“.clearDiv”)无效,请删除引号:div:not(.clearDi

假设有
div
的样式和更多的类-

div, .exceptDiv, .bigDiv {
    /*style...*/
}

我想保存一个不受任何样式影响的类-
clearDiv

我试过-

div:not(".clearDiv"), .exceptDiv, .bigDiv {
    /*style...*/
}

但它不起作用

如果可能的话,我正在寻找一种使用
而不是(…)
的解决方案

正确使用
not()

div:not(“.clearDiv”)
无效,请删除引号:
div:not(.clearDiv)