English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS 참조 설명서

CSS @규칙(RULES)

CSS 속성 전체

CSS3 :disabled 선택기

:disabled CSS 피클스는 어떤 비활성화된 요소도 나타냅니다. 요소가 활성화되지 않을 수 없다면(예: 선택, 클릭 또는 텍스트 입력을 받는 경우) 또는 포커스를 받을 수 없다면, 이 요소는 비활성화 상태입니다. 요소는 또한 활성화 상태(enabled state)가 있습니다. 활성화 상태에서 요소는 활성화되거나 포커스를 받을 수 있습니다.

완전한 CSS 선택자 참조 가이드

온라인 예제

모든 type="text"의 비활성화된 입력 요소의 배경색을 설정하십시오:

!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>기본 가이드(w3(codebox.com)</title> 
<style> 
input[type="text"]:enabled
{
    background:yellow;
}
input[type="text"]:disabled
{
    background:#dddddd;
}
</style>
</head>
<body>
<form action="">
이름: <input type="text" value="Mouse"> /><br>
지역: <input type="text" disabled="disabled" value="Disneyland"> /><br>
</form>
</body>
</html>
테스트를 보고 보세요 ‹/›

정의와 사용법

:disabled 선택자는 모든 비활성화된 요소를 매칭합니다(주로 양식 요소를 사용합니다).

브라우저 호환성

표의 숫자는 이 속성을 지원하는 첫 번째 브라우저 버전 번호를 나타냅니다。

선택자




:disabled4.09.03.53.29.6

온라인 예제

모든 비활성화된 입력 요소에 배경색을 설정합니다:

!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>기본 가이드(w3(codebox.com)</title> 
<style> 
input:enabled
{
    background:yellow;
}
input:disabled
{
    background:#dddddd;
}
</style>
</head>
<body>
<form action="">
First name: <input type="text" value="Mickey" /><br>
Last name: <input type="text" value="Mouse" /><br>
Country: <input type="text" disabled="disabled" value="Disneyland" /><br>
Password: <input type="password" name="password" />
<input type="radio" value="male" name="gender" /> Male<br>
<input type="radio" value="female" name="gender" /> Female<br>
<input type="checkbox" value="Bike" /> I have a bike<br>
<input type="checkbox" value="Car" /> I have a car 
</form>
</body>
</html>
테스트를 보고 보세요 ‹/›

완전한 CSS 선택자 참조 가이드