Sublime Text
<!DOCTYPE html> <html> <head> <style type="text/css"> input[type="number"]:in-range{ background-color: yellow; } </style> </head> <body> <input type="number" min="5" max="8" value="6"> <p>Bạn thử điền số nhỏ hơn 5 hoặc lớn hơn 8, rồi click ra ngoài để thấy sự khác biệt</p> </body> </html>
<!DOCTYPE html> <html> <head> <style type="text/css"> input[type="number"]:in-range{ background-color: yellow; } </style> </head> <body> <input type="number" min="5" max="8" value="6"> <p>Bạn thử điền số nhỏ hơn 5 hoặc lớn hơn 8, rồi click ra ngoài để thấy sự khác biệt</p> </body> </html>