html - Is there a CSS not equals selector? -


Is there anything like this! = (Not equal) in CSS? For example, I have the following code:

  input {... ...}  

But for some inputs I have to zero this . I want to do this by adding class "reset" to the input tag, e.g.

  & lt; Input class = "reset" ... />  

And then just leave this tag with CSS.

How can I do this?

The only way I can see some square for input tags, and rewriting CSS is as follows:

  input.mod {... ...}  

In CSS3, you can filter : not () You can use, but not all browsers fully support CSS3, so be sure you know what you are doing.

Example:

  & lt; Input type = "text" value = "will be matched" /> & Lt; Input type = "text" value = "will not match" class = "avoidme" /> & Lt; Input type = "text" value = "will be matched" />  

and CSS

  Input: no (.avoidme) {background color: green; }  

If you do not want to use CSS3, then you can set the style to all elements, and then reset it with a square.

  input {background color: green; } Input.avoidme {background-color: white; }  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -