<html>
<head>
<style>
input:invalid {
border: 2px solid red;
}
</style>
</head>
<body>
<h1>演示 :invalid 选择器</h1>
<input type="email" value="supportEmail">
<p>请尝试输入合法的电子邮件地址,以查看样式消失。</p>
<p><b>注释:</b>Internet Explorer 9 以及更早的版本不支持 invalid 选择器。</p>
</body>
</html>