CSS“not”选择器不起作用

时间:2012-08-13 10:11:33

标签: css

我不能在“not”选择器中加入两个不同的规则 例如:

此代码有效:

input:not([type=submit]) {
  // Styling here
}

但此代码不起作用:

input:not([type=submit], [type=reset]) {
  // Styling here
}

为什么第二个代码不起作用?

1 个答案:

答案 0 :(得分:6)

您的CSS语法无效。

使用2个:not选择器:

input:not([type=submit]):not([type=reset]) {
  // Styling here
}
相关问题