Can the :not() pseudo-class have multiple arguments?

后端 未结 5 993
旧时难觅i
旧时难觅i 2020-11-22 15:39

I\'m trying to select input elements of all types except radio and checkbox.

Many people have shown that you can

5条回答
  •  鱼传尺愫
    2020-11-22 16:11

    I was having some trouble with this, and the "X:not():not()" method wasn't working for me.

    I ended up resorting to this strategy:

    INPUT {
        /* styles */
    }
    INPUT[type="radio"], INPUT[type="checkbox"] {
        /* styles that reset previous styles */
    }
    

    It's not nearly as fun, but it worked for me when :not() was being pugnacious. It's not ideal, but it's solid.

提交回复
热议问题