aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/css/_colon_enabled/index.html
blob: a0753a2085304a60098fd6b81172341f11e0c8e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
title: ':enabled'
slug: 'Web/CSS/:enabled'
tags:
  - CSS
  - Layout
  - Pseudo-class
  - Reference
  - Web
translation_of: 'Web/CSS/:enabled'
---
<div>{{CSSRef}}</div>

<p><a href="/ko/docs/Web/CSS">CSS </a><strong><code>:enabled</code></strong> <a href="/ko/docs/Web/CSS/Pseudo-classes">의사 클래스</a>는 모든 활성 요소를 나타냅니다. 활성 요소란 활성(선택, 클릭, 입력 등등)하거나 포커스를 받을 수 있는 요소를 말합니다. 반대 상태인 비활성 요소도 존재합니다.</p>

<pre class="brush: css no-line-numbers">/* 모든 활성 &lt;input&gt; 선택 */
input:enabled {
  color: blue;
}</pre>

<h2 id="구문">구문</h2>

{{csssyntax}}

<h2 id="예제">예제</h2>

<p>다음 예제는 모든 활성 텍스트 및 버튼 {{htmlElement("input")}}의 글자 색을 초록색으로 만들고, 비활성 상태는 회색으로 만듭니다. 이런 구분을 통해 사용자는 상호작용 가능한 요소를 쉽게 구별할 수 있습니다.</p>

<h3 id="HTML">HTML</h3>

<pre class="brush:html">&lt;form action="url_of_form"&gt;
  &lt;label for="FirstField"&gt;First field (enabled):&lt;/label&gt;
  &lt;input type="text" id="FirstField" value="Lorem"&gt;&lt;br&gt;

  &lt;label for="SecondField"&gt;Second field (disabled):&lt;/label&gt;
  &lt;input type="text" id="SecondField" value="Ipsum" disabled="disabled"&gt;&lt;br&gt;

  &lt;input type="button" value="Submit"&gt;
&lt;/form&gt;</pre>

<h3 id="CSS">CSS</h3>

<pre class="brush:css;">input:enabled {
  color: #2b2;
}

input:disabled {
  color: #aaa;
}
</pre>

<h3 id="결과">결과</h3>

<p>{{EmbedLiveSample("예제", 550, 95)}}</p>

<h2 id="명세">명세</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', '#selector-enabled', ':enabled')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>No change.</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', '#selector-enabled', ':enabled')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>Defines the semantics for HTML and forms.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS4 Selectors', '#enableddisabled', ':enabled')}}</td>
   <td>{{Spec2('CSS4 Selectors')}}</td>
   <td>No change.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Selectors', '#enableddisabled', ':enabled')}}</td>
   <td>{{Spec2('CSS3 Selectors')}}</td>
   <td>Defines the pseudo-class, but not the associated semantics.</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>



<p>{{Compat("css.selectors.enabled")}}</p>

<h2 id="같이_보기">같이 보기</h2>

<ul>
 <li>{{Cssxref(":disabled")}}</li>
</ul>