텍스트 잘림
텍스트 잘림 (Text truncation)
긴 문자열을 말줄임표(…)로 잘라서 보여 주는 헬퍼에요.
출처: 문서
본문
긴 텍스트에 .text-truncate 클래스를 추가하면 말줄임표로 잘린 텍스트를 만들 수 있어요. display: inline-block 또는 display: block이 필요해요.
<!-- Block level -->
<div class="row">
<div class="col-2 text-truncate">
This text is quite long, and will be truncated once displayed.
</div>
</div>
<!-- Inline level -->
<span class="d-inline-block text-truncate" style="max-width: 150px;">
This text is quite long, and will be truncated once displayed.
</span>