Style textOverflow Property
Przykład
Zmień właściwość textOverflow:
document.getElementById("myDIV").style.textOverflow = "ellipsis";
Definicja i użycie
Właściwość textOverflow określa, co powinno się stać, gdy tekst przepełnia element zawierający.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
textOverflow | Yes | Yes | Yes | Yes | Yes |
Składnia
Zwróć właściwość textOverflow:
object.style.textOverflow
Ustaw właściwość textOverflow:
object.style.textOverflow = "clip|ellipsis|string|initial|inherit"
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | spinacz |
---|---|
Wartość zwrotu: | String, reprezentujący właściwość text-overflow elementu |
Wersja CSS | CSS3 |
Powiązane strony
Odniesienie CSS: właściwość text-overflow
❮ Obiekt stylu