Propriété TextOverflow de style
Exemple
Modifiez la propriété textOverflow :
document.getElementById("myDIV").style.textOverflow = "ellipsis";
Définition et utilisation
La propriété textOverflow spécifie ce qui doit se passer lorsque le texte déborde de l'élément conteneur.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
textOverflow | Yes | Yes | Yes | Yes | Yes |
Syntaxe
Renvoyez la propriété textOverflow :
object.style.textOverflow
Définissez la propriété textOverflow :
object.style.textOverflow = "clip|ellipsis|string|initial|inherit"
Valeurs de propriété
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 |
Détails techniques
Valeur par défaut: | agrafe |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété text-overflow d'un élément |
Version CSS | CSS3 |
Pages connexes
Référence CSS : propriété text-overflow
❮ Objet de style