Vlastnost stylu přetečení textu
Příklad
Změňte vlastnost textOverflow:
document.getElementById("myDIV").style.textOverflow = "ellipsis";
Definice a použití
Vlastnost textOverflow určuje, co se má stát, když text přeteče obsahující prvek.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
textOverflow | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte vlastnost textOverflow:
object.style.textOverflow
Nastavte vlastnost textOverflow:
object.style.textOverflow = "clip|ellipsis|string|initial|inherit"
Hodnoty vlastností
Value | Description |
---|---|
clip | Default value. Clips the text |
ellipsis | Render an ellipsis ("...") to represent clipped text |
string | Render the given string to represent clipped text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Technické údaje
Výchozí hodnota: | klip |
---|---|
Návratová hodnota: | Řetězec představující vlastnost přetečení textu prvku |
Verze CSS | CSS3 |
Související stránky
CSS reference: vlastnost text-overflow
❮ Objekt stylu