编辑下面的代码:【加编码】
<html> <head> <style> input:out-of-range { border:2px solid red; } </style> </head> <body> <h3> :out-of-range 选择器实例演示。</h3> <input type="number" min="5" max="10" value="17"> <p>在input中输入一个值 (小于 5 或者 大于 10), 查看样式的变化。</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂