<slot> - HTML: Hypertext Markup Language MDN

<slot> - HTML: Hypertext Markup Language   MDN

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

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

  • Learn more
  • See full compatibility
  • Report feedback

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

name슬롯의 이름.

html<templateid=“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><codeclass=“name”>&lt;<slotname=“element-name”>NEED NAME</slot>&gt;</code><iclass=“desc”><slotname=“description”>NEED DESCRIPTION</slot></i></summary><divclass=“attributes”><h4>Attributes</h4><slotname=“attributes”><p>None</p></slot></div></details><hr/></template>참고: 온전한 예제는 element-details(라이브로 보기)에서 볼 수 있습니다. 설명은 템플릿과 슬롯 사용하기에서 확인할 수 있습니다.

Specification
HTML Standard # the-slot-element
DOM Standard # shadow-tree-slots

브라우저 호환성

BCD tables only load in the browser

Was this page helpful to you?YesNoLearn how to contribute This page was last modified on 2023년 9월 20일 by MDN contributors.

View this page on GitHub • Report a problem with this content