CSS: invalid selector
CSS selectors complete reference manual
Examples
If the input element value is illegal, set the style for the red:
input:invalid
{
border:2px solid red;
}
{
border:2px solid red;
}
try it"
Definitions and use
: Invalid selector values used in form elements is illegal when you set the specified style.
Note:: invalid selector element can act only on the specified range of values, such as input elements min and max attributes, and correct email fields, numeric fields, and so legitimate.
Browser Support
Figures in the table represent the first browser to support the version number of the property.
选择器 | |||||
---|---|---|---|---|---|
:invalid | 10.0 | 10.0 | 4.0 | 5.0 | 10.0 |
CSS Syntax
:invalid
{
css 声明 ;
}
{
css 声明 ;
}
Related Pages
CSS selectors : valid