Các tiện ích để kiểm soát cách văn bản của một phần tử tràn.
| Class | Styles |
|---|---|
truncate | overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; |
text-ellipsis | text-overflow: ellipsis; |
text-clip | text-overflow: clip; |
Sử dụng tiện ích truncate để ngăn văn bản khỏi việc xuống dòng và cắt ngắn văn bản tràn với dấu chấm lửng (…) nếu cần:
The longest word in any of the major English language dictionaries is pneumonoultramicroscopicsilicovolcanoconiosis, a word that refers to a lung disease contracted from the inhalation of very fine silica particles, specifically from a volcano; medically, it is the same as silicosis.
<p class="truncate">The longest word in any of the major...</p>Sử dụng tiện ích text-ellipsis để cắt ngắn văn bản tràn với dấu chấm lửng (…) nếu cần:
The longest word in any of the major English language dictionaries is pneumonoultramicroscopicsilicovolcanoconiosis, a word that refers to a lung disease contracted from the inhalation of very fine silica particles, specifically from a volcano; medically, it is the same as silicosis.
<p class="overflow-hidden text-ellipsis">The longest word in any of the major...</p>Sử dụng tiện ích text-clip để cắt văn bản tại giới hạn của khu vực nội dung:
The longest word in any of the major English language dictionaries is pneumonoultramicroscopicsilicovolcanoconiosis, a word that refers to a lung disease contracted from the inhalation of very fine silica particles, specifically from a volcano; medically, it is the same as silicosis.
<p class="overflow-hidden text-clip">The longest word in any of the major...</p>Đây là hành vi mặc định của trình duyệt.
Prefix a text-overflow utility with a breakpoint variant like md: to only apply the utility at medium screen sizes and above:
<p class="text-ellipsis md:text-clip ..."> Lorem ipsum dolor sit amet...</p>Learn more about using variants in the variants documentation.