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/html/element/slot/index.html | 122 ++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 files/ko/web/html/element/slot/index.html (limited to 'files/ko/web/html/element/slot') diff --git a/files/ko/web/html/element/slot/index.html b/files/ko/web/html/element/slot/index.html new file mode 100644 index 0000000000..b710ceb7f6 --- /dev/null +++ b/files/ko/web/html/element/slot/index.html @@ -0,0 +1,122 @@ +--- +title: +slug: Web/HTML/Element/slot +tags: + - Element + - HTML + - HTML Web Components + - Reference + - Web + - Web Components + - 웹 컴포넌트 +translation_of: Web/HTML/Element/slot +--- +
{{HTMLRef}}
+ +

HTML <slot> 요소는 웹 컴포넌트 사용자가 자신만의 마크업으로 채워 별도의 DOM 트리를 생성하고, 컴포넌트와 함께 표현할 수 있는 웹 컴포넌트 내부의 플레이스홀더입니다.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
콘텐츠 카테고리플로우 콘텐츠, 구문 콘텐츠.
가능한 콘텐츠투명.
이벤트{{event("slotchange")}}
태그 생략{{no_tag_omission}}
가능한 부모 요소구문 콘텐츠를 허용하는 모든 요소.
가능한 ARIA 역할없음
DOM 인터페이스{{domxref("HTMLSlotElement")}}
+ +

특성

+ +

이 요소는 전역 특성을 포함합니다.

+ +
+
{{htmlattrdef("name")}}
+
슬롯의 이름.
+
+ +

예제

+ +
<template id="element-details-template">
+  <style>
+    details {font-family: "Open Sans Light", Helvetica, Arial, sans-serif }
+    .name {font-weight: bold; color: #217ac0; font-size: 120% }
+    h4 {
+      margin: 10px 0 -8px 0;
+      background: #217ac0;
+      color: white;
+      padding: 2px 6px;
+      border: 1px solid #cee9f9;
+      border-radius: 4px;
+    }
+    .attributes { margin-left: 22px; font-size: 90% }
+    .attributes p { margin-left: 16px; font-style: italic }
+  </style>
+  <details>
+    <summary>
+      <code class="name">&lt;<slot name="element-name">NEED NAME</slot>&gt;</code>
+      <i class="desc"><slot name="description">NEED DESCRIPTION</slot></i>
+    </summary>
+    <div class="attributes">
+      <h4>Attributes</h4>
+      <slot name="attributes"><p>None</p></slot>
+    </div>
+  </details>
+  <hr>
+</template>
+ +
+

참고: 온전한 예제는 element-details(라이브로 보기)에서 볼 수 있습니다. 설명은 템플릿과 슬롯 사용하기에서 확인할 수 있습니다.

+
+ +

명세

+ + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComments
{{SpecName('HTML WHATWG','scripting.html#the-slot-element','<slot>')}}{{Spec2('HTML WHATWG')}}
{{SpecName('DOM WHATWG','#shadow-tree-slots','Slots')}}{{Spec2('DOM WHATWG')}}
+ +

브라우저 호환성

+ + + +

{{Compat("html.elements.slot")}}

-- cgit v1.2.3-54-g00ecf