Note: in the inputs below, integers (or their equivalents) are valid, while fractional numbers are not. You can change the values via keyboard to make them invalid or valid. When an input’s value becomes invalid, it changes slowly to red. When the value changes from invalid to valid, it changes to green quickly. You can edit the times in the CSS above to change the durations of the transitions.