From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/css/_colon_default/index.html | 101 +++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 files/ko/web/css/_colon_default/index.html (limited to 'files/ko/web/css/_colon_default') 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' +--- +
{{CSSRef}}
+ +

CSS :default 의사 클래스는 연관 요소 내에서의 기본값인 요소를 선택합니다.

+ +

이 선택자는 HTML Standard §4.16.3 Pseudo-classes에 정의되어 있듯 {{htmlelement("button")}}, <input type="checkbox">, <input type="radio">, {{htmlelement("option")}} 요소를 아래와 같은 경우에 선택합니다.

+ + + +

구문

+ +
{{csssyntax}}
+
+ +

예제

+ +

HTML

+ +
<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>
+
+ +

CSS

+ +
input:default {
+  box-shadow: 0 0 2px 1px coral;
+}
+
+input:default + label {
+  color: coral;
+}
+
+ +

결과

+ +

{{EmbedLiveSample("예제")}}

+ +

명세

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#selector-default', ':default')}}{{Spec2('HTML WHATWG')}}No change.
{{SpecName('HTML5 W3C', '#selector-default', ':default')}}{{Spec2('HTML5 W3C')}}Defines associated HTML semantics and constraint validation.
{{SpecName('CSS4 Selectors', '#default-pseudo', ':default')}}{{Spec2('CSS4 Selectors')}}No change.
+ +

브라우저 호환성

+ +
+ + +

{{Compat("css.selectors.default")}}

+
-- cgit v1.2.3-54-g00ecf