letter-spacing
A propriedade CSS letter-spacing
específica o comportamento do espaçamento entre caracteres de texto.
Experimente
Syntax
css
/* Keyword value */
letter-spacing: normal;
/* <length> values */
letter-spacing: 0.3em;
letter-spacing: 3px;
letter-spacing: 0.3px;
/* Global values */
letter-spacing: inherit;
letter-spacing: initial;
letter-spacing: unset;
Values
normal
-
O espaçamento de letras normal para a fonte atual. Ao contrário de um valor de 0, essa palavra-chave permite que o agente do usuário altere o espaço entre os caracteres para justificar o texto.
<length>
(en-US)-
Especifica o espaço adicional entre caracteres, além do espaço padrão entre os caracteres. Os valores podem ser negativos, mas pode haver limites específicos da implementação. Os agentes de usuário podem não aumentar ou diminuir o espaço inter-personagem para justificar o texto.
Formal syntax
letter-spacing =
normal | (en-US)
<length> (en-US)
Examples
HTML
html
<p class="normal">letter spacing</p>
<p class="em-wide">letter spacing</p>
<p class="em-wider">letter spacing</p>
<p class="em-tight">letter spacing</p>
<p class="px-wide">letter spacing</p>
CSS
css
.normal {
letter-spacing: normal;
}
.em-wide {
letter-spacing: 0.4em;
}
.em-wider {
letter-spacing: 1em;
}
.em-tight {
letter-spacing: -0.05em;
}
.px-wide {
letter-spacing: 6px;
}
Result
Specifications
Specification | Status | Comment |
---|---|---|
CSS Text Module Level 3 The definition of 'letter-spacing' in that specification. |
Candidata a Recomendação | No change. |
CSS Transitions The definition of 'letter-spacing' in that specification. |
Rascunho atual | Defines letter-spacing as animatable. |
CSS Level 2 (Revision 1) The definition of 'letter-spacing' in that specification. |
Recomendação | No change. |
Scalable Vector Graphics (SVG) 1.1 (Second Edition) The definition of 'letter-spacing' in that specification. |
Recomendação | Initial SVG definition. |
CSS Level 1 The definition of 'letter-spacing' in that specification. |
Recomendação | Initial definition. |
Initial value | normal |
---|---|
Aplica-se a | all elements. It also applies to ::first-letter and ::first-line . |
Inherited | yes |
Computed value | an optimum value consisting of either an absolute length or the keyword normal |
Animation type | a length |
Browser compatibility
BCD tables only load in the browser