Atrybut font-stretch w CSS

Definition and Usage

The font-stretch property can stretch or compress the current font-family.

See also:

CSS Tutorial:Czcionki CSS

CSS Reference Manual:Atrybut font w CSS

HTML DOM Reference Manual:fontStretch Property

Example

Set the font-stretch property of the HTML element:

h1
  {
  font-stretch:ultra-condensed;
  }

CSS Syntax

font-stretch: ultra-condensed|extra-condensed|condensed|semi-condensed|normal|semi-expanded|expanded|extra-expanded|ultra-expanded|initial|inherit;

Property Value

Value Description
normal Default Value. Set the scaling ratio to standard.
wider Set the expand ratio to an even wider value
narrower Set the shrink ratio to an even narrower value
  • ultra-condensed
  • extra-condensed
  • condensed
  • semi-condensed
  • semi-expanded
  • expanded
  • extra-expanded
  • ultra-expanded

Set the scaling ratio of font-family.

"ultra-condensed" is the widest value, while "ultra-expanded" is the narrowest value.

Technical Details

Default Value: normal
Inheritance: yes
Version: CSS2
JavaScript Syntax: object.style.fontStretch="ultra-expanded"

Obsługa przeglądarek

Liczby w tabeli wskazują na pierwszą wersję przeglądarki, która w pełni obsługuje tę właściwość.

Chrome IE / Edge Firefox Safari Opera
48.0 9.0 9.0 11.0 35.0