font-variantPropertiesSets the font for displaying text in small caps. This means that all lowercase letters will be converted to uppercase, but all letters using small caps font will be converted to uppercase. Its font size is smaller compared to the rest of the text.
Value small-caps The browser will display the font of small capital letters.
Syntax:
font-variant : normal | small-caps
Parameters:
normal: normal font
small-caps: small uppercase font
Description:
Set or Retrieve whether the text inobjectis small caps.
The corresponding script feature is fontVariant. Please see other books I have written.
text-transformThe difference between text-transform and font-variant
text-transform and font-variant can both convert English Convert text to uppercase or lowercase. But the only function of font-variant is to convert English text into "small" uppercase text. Note that this is "small". Generally, the font-variant attribute is rarely used. For English case conversion, we use the text-transform attribute instead of the font-variant attribute.
Instance of font-variant attribute
CSS font-variant 属性示例 The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog.
The above is the detailed content of Introduction and examples of fontVariant in css attributes. For more information, please follow other related articles on the PHP Chinese website!