Propriedade de espaçamento entre letras CSS
Exemplo
Defina o espaçamento entre letras para os elementos <h1>, <h2> e <h3>:
h1 {
letter-spacing: 3px;
}
h2 {
letter-spacing: 2px;
}
h3 {
letter-spacing:
-1px;
}
Definição e uso
A letter-spacing
propriedade aumenta ou diminui o espaço entre os caracteres em um texto.
Valor padrão: | normal |
---|---|
Herdado: | sim |
Animavel: | sim. Leia sobre animáveis |
Versão: | CSS1 |
Sintaxe JavaScript: | objeto .style.letterSpacing="3px" |
Suporte ao navegador
Os números na tabela especificam a primeira versão do navegador que oferece suporte total à propriedade.
Property | |||||
---|---|---|---|---|---|
letter-spacing | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintaxe CSS
letter-spacing: normal|length|initial|inherit;
Valores de propriedade
Value | Description | Play it |
---|---|---|
normal | No extra space between characters. This is default | |
length | Defines an extra space between characters (negative values are allowed). Read about length units | |
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 letterSpacing