The best CSS3 text-overflow property Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Attribute definitions and instructions,grammar,More examples,related articles,

CSS3 text-overflow property

Examples

Use text-overflow property:

div.test
{
text-overflow:ellipsis;
}


In the bottom of this page for more examples.

Browser Support

Figures in the table represent the first browser to support the version number of the property.

属性
text-overflow 4.0 6.0 7.0 3.1 11.0
9.0 -o-

Attribute definitions and instructions

text-overflow property specifies when the text overflows the containing element, what should happen.

Defaults: clip
inherit: no
version: CSS3
JavaScript syntax: object .style.textOverflow = "ellipsis"


grammar

text-overflow: clip|ellipsis|string;

value description
clip Trim text.
ellipsis Display apostrophe to represent manicured text.
string Use the given string represents trimmed text.


Examples

More examples

Hover displays the entire text
This example demonstrates that when mouse hovers over the element, how to display the entire text.


related articles

CSS3 tutorial: CSS3 the Text Effects

CSS3 text-overflow property
10/30