font-kerning

CSS font-kerning Property

The font-kerning property controls the use of the kerning information stored in a font. Kerning defines the spacing of the letters.

Kerning specifies how the letters are spaced. It makes character spacing more pleasant to the eye and easier to read.

类目类目
Initial Valueauto
Applies toAll elements. It also applies to ::first-letter and ::first-line.
InheritedYes.
AnimatableNo.
VersionCSS3
DOM Syntaxobject.style.fontKerning = “none”;

Syntax

Syntax

font-kerning: auto | normal | none;

Example of the font-kerning property:

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      div {
        font-family: serif;
        font-size: 20px;
      }
      div.example1 {
        font-kerning: normal;
      }
      div.example2 {
        font-kerning: auto;
      }
    </style>
  </head>
  <body>
    <h2>Font-kerning property example</h2>
    <div class="example1">The text is with font kerning.</div>
    <div class="example2">The text is without font kerning.</div>
  </body>
</html>

Values

Values

ValueDescription
autoIt depends on the browser if font-kerning should be set or not. This is the default value of the property.
normalSets the font kerning.
noneDoes not set the font kerning.


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

扫一扫,反馈当前页面

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