Propiedad de espaciado de letras CSS
Ejemplo
Establezca el espacio entre letras para los elementos <h1>, <h2> y <h3>:
h1 {
letter-spacing: 3px;
}
h2 {
letter-spacing: 2px;
}
h3 {
letter-spacing:
-1px;
}
Definición y uso
La letter-spacing
propiedad aumenta o disminuye el espacio entre caracteres en un texto.
Valor por defecto: | normal |
---|---|
Heredado: | sí |
Animable: | si. Leer sobre animable |
Versión: | CSS1 |
Sintaxis de JavaScript: | objeto .style.letterSpacing="3px" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Property | |||||
---|---|---|---|---|---|
letter-spacing | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintaxis CSS
letter-spacing: normal|length|initial|inherit;
Valores de propiedad
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
Referencia HTML DOM: propiedad letterSpacing