<html>
<head>
<meta charset="utf-8">
<title>高手教程(study.p2hp.com)</title>
<style>
input:valid
{
background-color: yellow;
}
</style>
</head>
<body>
<h3> :valid 选择器实例演示。</h3>
<input type="email" value="support@exampel.com" />
<p>请输入非法 e-mail 地址,查看样式变化。</p>
</body>
</html>