HTML DOM Style textOverflow property
Examples
Change textOverflow properties:
document.getElementById("myDIV").style.textOverflow="ellipsis";
try it"
Definition and Usage
textOverflow attribute specifies when the text overflows the containing element, what should happen.
Browser Support
All major browsers support textOverflow property.
grammar
Back textOverflow properties:
object .style.textOverflow
Setting textOverflow properties:
object .style.textOverflow="clip|ellipsis|string|initial|inherit"
Property Value
值 | 描述 |
---|---|
clip | 默认值。裁剪文本。 |
ellipsis | 使用省略符号("...")来代表被裁剪的文本。 |
string | 使用给定的字符串来代表被裁剪的文本。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | clip |
---|---|
return value | String representing the text-overflow property element. |
CSS version | CSS3 |
related articles
CSS Reference: text-overflow property