The text-overflow-mode CSS property controls the presence and position of the hint on overflowed content that is not displayed is signaled to the users. The constitution of the hint is controlled with CSS property text-overflow-ellipsis. Shorthand property is text-overflow.
Overview tableclip
text-overflow-mode
text-overflow-mode: clip
text-overflow-mode: ellipsis
text-overflow-mode: ellipsis-word
<div class="overflowed overflowed-clip">
<p>This is an example text showing nothing interesting but the truncated content via text-overflow shorthand property.</p>
</div>
<div class="overflowed overflowed-ellipsis">
<p>This is an example text showing nothing interesting but the truncated content via text-overflow shorthand property.</p>
</div>
<div class="overflowed overflowed-ellipsis-word">
<p>This is an example text showing nothing interesting but the truncated content via text-overflow shorthand property.</p>
</div>
.overflowed > p{
width: 10em;
height: 5em;
white-space: nowrap;
overflow: hidden;
}
.overflowed-clip {
text-overflow-mode: clip;
}
.overflowed-ellipsis > p {
text-overflow-mode: ellipsis;
}
.overflowed-ellipsis-word > p {
text-overflow-mode: ellipsis-word;
}
Notes
This property only applies to text overflow in the inline direction (horizontal, in normal Western text). Inline overflow occurs when the text in a line overflows the available width without a breaking opportunity. To force overflow to occur and ellipses to be applied, the author must apply the nowrap value to the white-space property on the element, or wrap the content in a <NOBR> tag. If there is no breaking opportunity (for example, the width is narrow or there is a long word that does not break well), then overflow may occur without nowrap being applied. This property on the element must be set to something other than visible, the default, in order for ellipsis to be rendered. The best choice is to set overflow to hidden. Setting overflow to scroll or auto will also work, but will show scrollbars. The hidden text can be selected by selecting the ellipses. When selected, the ellipses will disappear and be replaced by the text to the extent of the layout area. This property offers an efficient alternative to building ellipses in Dynamic HTML (DHTML). As ellipses may be rendered many times on a single page, using this property can significantly speed up performance.
See also Related articles CSS Attributestext-overflow-mode
text-overflow-mode
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4