x
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<style>
6
input:out-of-range {
7
border: 2px solid red;
8
}
9
</style>
10
</head>
11
<body>
12
13
<h3> :out-of-range 选择器实例演示。</h3>
14
15
<input type="number" min="5" max="10" value="17" />
16
17
<p>在input中输入一个值 (小于 5 或者 大于 10), 查看样式的变化。</p>
18
19
</body>
20
</html>