Back to the index.
See also the CSS3 User Interface spec.
There are several pseudo-classes that are used to style the various states of form elements. This page tests some of them.
:valid: The form field value conforms to the pattern.:invalid: The form field value does not conform to the pattern.Test sheet:
input:invalid {
border: 1px solid #CB000F;
color: red
}
input:valid {
color: #00882D;
font-weight: bold;
}
input:indeterminate {
background-color: grey;
}