Proprietà CSS di rientro del testo
Esempio
Rientra la prima riga di testo con valori diversi:
div.a {
text-indent: 50px;
}
div.b {
text-indent: -2em;
}
div.c {
text-indent:
30%;
}
Definizione e utilizzo
La text-indent
proprietà specifica il rientro della prima riga in un blocco di testo.
Nota: sono ammessi valori negativi. La prima riga sarà rientrata a sinistra se il valore è negativo.
Valore di default: | 0 |
---|---|
Ereditato: | sì |
Animabile: | sì. Leggi su animabile |
Versione: | CSS1 |
sintassi JavaScript: | oggetto .style.textIndent="50px" |
Supporto browser
I numeri nella tabella specificano la prima versione del browser che supporta completamente la proprietà.
Property | |||||
---|---|---|---|---|---|
text-indent | 1.0 | 3.0 | 1.0 | 1.0 | 3.5 |
Sintassi CSS
text-indent: length|initial|inherit;
Valori di proprietà
Value | Description | Play it |
---|---|---|
length | Defines a fixed indentation in px, pt, cm, em, etc. Default value is 0. Read about length units | |
% | Defines the indentation in % of the width of the parent element | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Pagine correlate
Tutorial CSS: testo CSS
Riferimento HTML DOM: proprietà textIndent