Font-stretch is a CSS property that allows you to adjust the width of a font. It is used to stretch or compress the characters in a font horizontally. This property is used to change the width of the font without changing the height of the font. It is a relatively new property in CSS and is not supported by all browsers.
The font-stretch property is used to specify the amount of horizontal stretching or compression that should be applied to the font. The values for font-stretch are:
The default value for font-stretch is "normal". This means that the font is not stretched or compressed. The other values for font-stretch are used to stretch or compress the font horizontally.
Here are some examples of how to use the font-stretch property in CSS:
In this example, the font-stretch property is set to "normal". This means that the font is not stretched or compressed.
p {
font-stretch: normal;
}
In this example, the font-stretch property is set to "condensed". This means that the font is compressed horizontally.
p {
font-stretch: condensed;
}
In this example, the font-stretch property is set to "expanded". This means that the font is stretched horizontally.
p {
font-stretch: expanded;
}
In this example, the font-stretch property is set to "ultra-expanded". This means that the font is stretched even more than in the previous example.
p {
font-stretch: ultra-expanded;
}
The font-stretch property is not supported by all browsers. It is supported by most modern browsers, including Chrome, Firefox, Safari, and Opera. However, it is not supported by Internet Explorer or Microsoft Edge.
If you want to use the font-stretch property in your CSS, you should test your website in different browsers to make sure that it works correctly.
The font-stretch property is a useful CSS property that allows you to adjust the width of a font. It is used to stretch or compress the characters in a font horizontally. This property is not supported by all browsers, so you should test your website in different browsers to make sure that it works correctly.