Propiedad CSS font-stretch
Ejemplo
Haz que el texto de los elementos <div> sea más ancho:
div
{
font-family: sans-serif, "Helvetica Neue", "Lucida Grande", Arial;
font-stretch: expanded;
}
Definición y uso
La font-stretch
propiedad le permite hacer que el texto sea más estrecho (condensado) o más ancho (expandido).
Nota: Algunas fuentes proporcionan caras adicionales; Caras condensadas y caras expandidas. Para estas fuentes, puede usar la font-stretch
propiedad para seleccionar una fuente normal, condensada o expandida.
Nota: ¡Esta propiedad no tiene efecto si la fuente seleccionada no ofrece caras condensadas o expandidas!
Valor por defecto: | normal |
---|---|
Heredado: | sí |
Animable: | si. Leer sobre animable |
Versión: | CSS3 |
Sintaxis de JavaScript: | objeto .style.fontStretch="expandido" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Property | |||||
---|---|---|---|---|---|
font-stretch | 48.0 | 9.0 | 9.0 | 11.0 | 35.0 |
Sintaxis
font-stretch: ultra-condensed|extra-condensed|condensed|semi-condensed|normal|semi-expanded|expanded|extra-expanded|ultra-expanded|initial|inherit;
Valores de propiedad
Value | Description |
---|---|
ultra-condensed | Makes the text as narrow as it gets |
extra-condensed | Makes the text narrower than condensed, but not as narrow as ultra-condensed |
condensed | Makes the text narrower than semi-condensed, but not as narrow as extra-condensed |
semi-condensed | Makes the text narrower than normal, but not as narrow as condensed |
normal | Default value. No font stretching |
semi-expanded | Makes the text wider than normal, but not as wide as expanded |
expanded | Makes the text wider than semi-expanded, but not as wide as extra-expanded |
extra-expanded | Makes the text wider than expanded, but not as wide as ultra-expanded |
ultra-expanded | Makes the text as wide as it gets |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |