核心:启用的
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Document</title><style type="text/css">.test1:enabled/*启用的类型加上红色的边框*/{
border: 1px solid red;}.test1:enabled{
border: 1px solid yellow;/*覆盖*/}</style>
</head>
<body><form>启用:<input type="text" name="username" id="" class="test1">禁用:<input type="text" name="username" id="" disabled="disabled" class="test1"><br>启用:<textarea class="test1"></textarea>禁用:<textarea class="test1" disabled="false"></textarea><br>启用按钮:<input type="button" name="" value="btn1" class="test1">启用按钮:<input type="submit" name="" value="btn2" class="test1">启用按钮:<input type="reset" name="" value="btn3" class="test1">禁用按钮:<input type="button" name="" value="btn1" class="test1" disabled="disabled">禁用按钮:<input type="submit" name="" value="btn2" class="test1" disabled="disabled">禁用按钮:<input type="reset" name="" value="btn3" class="test1" disabled="disabled"></form></body>
</html>