CSS3 text-overflow property
Examples
Use text-overflow property:
div.test
{
text-overflow:ellipsis;
}
{
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. |
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