Propriedade de recuo de texto CSS
Exemplo
Recue a primeira linha de texto com valores diferentes:
div.a {
text-indent: 50px;
}
div.b {
text-indent: -2em;
}
div.c {
text-indent:
30%;
}
Definição e uso
A text-indent
propriedade especifica o recuo da primeira linha em um bloco de texto.
Nota: Valores negativos são permitidos. A primeira linha será recuada para a esquerda se o valor for negativo.
Valor padrão: | 0 |
---|---|
Herdado: | sim |
Animavel: | sim. Leia sobre animáveis |
Versão: | CSS1 |
Sintaxe JavaScript: | objeto .style.textIndent="50px" |
Suporte ao navegador
Os números na tabela especificam a primeira versão do navegador que oferece suporte total à propriedade.
Property | |||||
---|---|---|---|---|---|
text-indent | 1.0 | 3.0 | 1.0 | 1.0 | 3.5 |
Sintaxe CSS
text-indent: length|initial|inherit;
Valores de propriedade
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 |
Páginas relacionadas
Tutorial CSS: Texto CSS
Referência HTML DOM: propriedade textIndent