font-size-adjust

CSS font-size-adjust Property

The font-size-adjust property controls the font size when the first specified font is not available. In such cases, the browser uses the second specified font. Thus, the font size can be changed. The font-size-adjust controls this process.

The font-size-adjust property is one of the CSS3 properties.

All fonts have an “aspect value” which is the difference of size between the lowercase letter and the uppercase letter.

类目类目
Initial Valuenone
Applies toAll elements. It also applies to ::first-letter and ::first-line.
InheritedYes.
AnimatableYes.
VersionCSS3
DOM Syntaxobject.style.fontSizeAdjust = “0.5”;

Syntax

Syntax

font-size-adjust: number | none | initial | inherit;

Example of the font-size-adjust property:

<!DOCTYPE html>
<html>
  <head>
    <title>The title of the document </title>
    <style>
      div.a {
        font-family: sans-serif;
      }
      div.b {
        font-family: 'times new roman';
      }
      #box-one,
      #box-two {
        font-size-adjust: 0.58;
      }
    </style>
  </head>
  <body>
    <h1>Font-size-adjust property example</h1>
    <h2>Two divs with the same font-size-adjust property:</h2>
    <div id="box-one" class="a">
      The font-size-adjust CSS property sets how the font size should be chosen based on the height of lowercase rather than capital letters.
    </div>
    <div id="box-two" class="b">
      The font-size-adjust CSS property sets how the font size should be chosen based on the height of lowercase rather than capital letters.
    </div>
    <h2>Two divs without the font-size-adjust property:</h2>
    <div class="a">
      The font-size-adjust CSS property sets how the font size should be chosen based on the height of lowercase rather than capital letters.
    </div>
    <div class="b">
      The font-size-adjust CSS property sets how the font size should be chosen based on the height of lowercase rather than capital letters.
    </div>
  </body>
</html>

Values

Values

ValueDescription
noneNo any font size adjustment. This is the default value of the property.
numberSets the aspect value.
initialIt makes the property use its default value.
inheritIt inherits the property from its parents element.


请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部