CSS :disabled 선택기를 사용하여 비활성화된 모든 요소의 스타일을 지정합니다. 다음 코드를 실행하여 :disabled 선택기를 구현할 수 있습니다.
예시
<!DOCTYPE html>
<html>
<head>
<style>
input:enabled {
background: blue;
}
input:disabled {
background: red;
}
</style>
</head>
<body>
<form action = "">
Subject <input type = "text" name = "subject"><br>
Student: <input type = "text" name = "student"><br>
Age: <input type = "number" name = "age" disabled><br>
</form>
</body>
</html>