diff options
Diffstat (limited to 'files/ko/web/css/-webkit-line-clamp/index.html')
-rw-r--r-- | files/ko/web/css/-webkit-line-clamp/index.html | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/files/ko/web/css/-webkit-line-clamp/index.html b/files/ko/web/css/-webkit-line-clamp/index.html new file mode 100644 index 0000000000..1c08a3f70b --- /dev/null +++ b/files/ko/web/css/-webkit-line-clamp/index.html @@ -0,0 +1,111 @@ +--- +title: '-webkit-line-clamp' +slug: Web/CSS/-webkit-line-clamp +tags: + - CSS + - CSS Property + - Non-standard + - Reference + - 'recipe:css-property' +translation_of: Web/CSS/-webkit-line-clamp +--- +<div>{{CSSRef}}</div> + +<p><strong><code>-webkit-line-clamp</code></strong> CSS 속성은 {{Glossary("block container", "블록 컨테이너")}}의 콘텐츠를 지정한 줄 수만큼으로 제한합니다.</p> + +<p>{{cssxref("display")}} 속성을 <code>-webkit-box</code> 또는 <code>-webkit-inline-box</code>로, 그리고 {{cssxref("-webkit-box-orient")}} 속성을 <code>vertical</code>로 설정한 경우에만 동작합니다.</p> + +<p><code>-webkit-line-clamp</code>만 사용하는 경우, 말줄임표는 노출되나 넘친 콘텐츠가 숨겨지지 않으므로 대개 {{cssxref("overflow")}} 속성 또한 <code>hidden</code>으로 설정해야 합니다.</p> + +<p>앵커 요소에 적용한 경우 텍스트의 끝이 아니라 중앙에서 잘리는 경우도 있습니다.</p> + +<div class="blockIndicator note"> +<p><strong>참고</strong>:<code>-webkit-line-clamp</code>는 원래 WebKit이 구현했었으며 몇몇 문제점을 가지고 있으나 레거시 지원을 위해 표준화를 거쳤습니다. <a href="https://www.w3.org/TR/css-overflow-3/#propdef--webkit-line-clamp">CSS Overflow Module Level 3</a> 명세의 {{cssxref("line-clamp")}}가 <code>-webkit-line-clamp</code>를 대체하기 위해 정의된 속성입니다.</p> +</div> + +<h2 id="구문">구문</h2> + +<pre class="brush:css notranslate">/* 키워드 값 */ +-webkit-line-clamp: none; + +/* <integer> 값 */ +-webkit-line-clamp: 3; +-webkit-line-clamp: 10; + +/* 전역 값 */ +-webkit-line-clamp: inherit; +-webkit-line-clamp: initial; +-webkit-line-clamp: unset; +</pre> + +<dl> + <dt><code>none</code></dt> + <dd>콘텐츠를 자르지 않습니다.</dd> + <dt>{{cssxref("integer")}}</dt> + <dd>몇 줄 뒤에 콘텐츠를 자를지 지정합니다. 0보다 커야 합니다.</dd> +</dl> + +<h2 id="형식_정의">형식 정의</h2> + +<p>{{cssinfo}}</p> + +<h2 id="형식_구문">형식 구문</h2> + +<pre class="syntaxbox notranslate">{{CSSSyntax}}</pre> + +<h2 id="예제">예제</h2> + +<h3 id="문단_자르기">문단 자르기</h3> + +<h4 id="HTML">HTML</h4> + +<pre class="brush: html notranslate"><p> + In this example the <code>-webkit-line-clamp</code> property is set to <code>3</code>, which means the text is clamped after three lines. + An ellipsis will be shown at the point where the text is clamped. +</p></pre> + +<h4 id="CSS">CSS</h4> + +<pre class="brush: css notranslate">p { + width: 300px; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; +}</pre> + +<h4 id="결과">결과</h4> + +<p>{{EmbedLiveSample("예제", "100%", "100")}}</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("CSS3 Overflow", "#propdef--webkit-line-clamp", "-webkit-line-clamp")}}</td> + <td>{{Spec2("CSS3 Overflow")}}</td> + <td>Initial definition</td> + </tr> + </tbody> +</table> + +<h2 id="브라우저_호환성">브라우저 호환성</h2> + + + +<p>{{Compat("css.properties.-webkit-line-clamp")}}</p> + +<h2 id="같이_보기">같이 보기</h2> + +<ul> + <li><a href="https://css-tricks.com/line-clampin/">Line Clampin’ (Truncating Multiple Line Text)</a></li> + <li>{{cssxref("line-clamp")}}</li> +</ul> |