diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:42:17 -0500 |
commit | da78a9e329e272dedb2400b79a3bdeebff387d47 (patch) | |
tree | e6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/web/css/_colon_default | |
parent | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff) | |
download | translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2 translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip |
initial commit
Diffstat (limited to 'files/ko/web/css/_colon_default')
-rw-r--r-- | files/ko/web/css/_colon_default/index.html | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/files/ko/web/css/_colon_default/index.html b/files/ko/web/css/_colon_default/index.html new file mode 100644 index 0000000000..06e0558495 --- /dev/null +++ b/files/ko/web/css/_colon_default/index.html @@ -0,0 +1,101 @@ +--- +title: ':default' +slug: 'Web/CSS/:default' +tags: + - CSS + - Layout + - Pseudo-class + - Reference + - Selector + - Web +translation_of: 'Web/CSS/:default' +--- +<div>{{CSSRef}}</div> + +<p><a href="/ko/docs/Web/CSS">CSS</a> <strong><code>:default</code></strong> <a href="/ko/docs/Web/CSS/Pseudo-classes">의사 클래스</a>는 연관 요소 내에서의 기본값인 요소를 선택합니다.</p> + +<p>이 선택자는<a href="https://html.spec.whatwg.org/multipage/semantics-other.html#selector-default"> HTML Standard §4.16.3 Pseudo-classes</a>에 정의되어 있듯 {{htmlelement("button")}}, <code><a href="/ko/docs/Web/HTML/Element/input/checkbox"><input type="checkbox"></a></code>, <code><a href="/ko/docs/Web/HTML/Element/input/radio"><input type="radio"></a></code>, {{htmlelement("option")}} 요소를 아래와 같은 경우에 선택합니다.</p> + +<ul> + <li>옵션 요소의 기본값은 <code>selected</code> 특성을 가진 제일 첫 요소, 즉 DOM 순서 기준으로 제일 앞의 활성화 옵션입니다. <code>multiple</code> 특성의 {{htmlelement("select")}}는 둘 이상의 <code>selected</code> 옵션을 가질 수도 있으므로, 모든 옵션이 <code>:default</code>로 선택됩니다.</li> + <li><code><input type="checkbox"></code>와 <code><input type="radio"></code>는 <code>checked</code> 특성을 가지고 있으면 선택됩니다.</li> + <li>{{htmlelement("button")}}은 {{htmlelement("form")}} 요소의 <a href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission">기본 제출 버튼</a>, 즉 DOM 순서 기준으로 양식에 속하는 제일 첫 <code><button></code>이면 선택됩니다. (<code>image</code>와 <code>submit</code>처럼, 양식을 제출하는 다른 {{htmlelement("input")}} 유형에도 적용됩니다.)</li> +</ul> + +<h2 id="구문">구문</h2> + +<pre class="syntaxbox notranslate">{{csssyntax}} +</pre> + +<h2 id="예제">예제</h2> + +<h3 id="HTML">HTML</h3> + +<pre class="brush: html notranslate"><fieldset> + <legend>Favorite season</legend> + + <input type="radio" name="season" id="spring"> + <label for="spring">Spring</label> + + <input type="radio" name="season" id="summer" checked> + <label for="summer">Summer</label> + + <input type="radio" name="season" id="fall"> + <label for="fall">Fall</label> + + <input type="radio" name="season" id="winter"> + <label for="winter">Winter</label> +</fieldset> +</pre> + +<h3 id="CSS">CSS</h3> + +<pre class="brush: css notranslate">input:default { + box-shadow: 0 0 2px 1px coral; +} + +input:default + label { + color: coral; +} +</pre> + +<h3 id="결과">결과</h3> + +<p>{{EmbedLiveSample("예제")}}</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-default', ':default')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td>No change.</td> + </tr> + <tr> + <td>{{SpecName('HTML5 W3C', '#selector-default', ':default')}}</td> + <td>{{Spec2('HTML5 W3C')}}</td> + <td>Defines associated HTML semantics and constraint validation.</td> + </tr> + <tr> + <td>{{SpecName('CSS4 Selectors', '#default-pseudo', ':default')}}</td> + <td>{{Spec2('CSS4 Selectors')}}</td> + <td>No change.</td> + </tr> + </tbody> +</table> + +<h2 id="브라우저_호환성">브라우저 호환성</h2> + +<div> + + +<p>{{Compat("css.selectors.default")}}</p> +</div> |