📜  CSS |字体字距调整属性

📅  最后修改于: 2021-11-09 08:54:20             🧑  作者: Mango

此属性用于控制已存储在字体中的字距调整信息的使用。字距定义了字母的间距。对于那些没有字距调整信息的字体,此属性将没有可见效果。

句法:

font-kerning: auto|normal|none;

默认值:

  • 汽车

财产:

  • auto:这是默认值。浏览器决定是否应用字体字距调整。
  • normal:用于指定字体字距调整在浏览器上正常应用。
  • none:用于指定不应用字体字距调整。

例子:

html


    
        
            CSS | font-kerning Property
        </ttile>
        <style>
            div {
                font-family: serif;
                font-size: 20px;
                font-weight:bold;
            }
            div.geeks {
                font-kerning: normal;
            }
            div.SUDO {
                font-kerning: auto;
            }
            div.gfg {
                font-Kerning:none;
            }
            h1 {
                color:green;
            }
            body {
                text-align:center;
            }
        </style>
    </head>
    <body>
        <h1>GeeksforGeeks</h1>
        <h2>The font-kerning Property</h2>
        <h3>font-kerning:normal;</h3>
        <div class="geeks">
         GeeksforGeeks:
         A computer science portal for Geeks
        </div>
        <h3>font-kerning:auto;</h3>
        <div class="sudo">
         GeeksforGeeks:
         A computer science portal for Geeks</div>
        <h3>font-Kerning:none;</h3>
        <div class="gfg">
         GeeksforGeeks:
         A computer science portal for Geeks
        </div>
    </body>
</html></code></pre>
</div>
<p></p>
<hr/>
</div>
<p><strong>输出:</strong> </p>
<p><img alt="" class="img-fluid" src="https://mangodoc.oss-cn-beijing.aliyuncs.com/geek8geeks/CSS_%7C_font-kerning_Property_0.jpg"/></p>
<p><strong>支持的浏览器:</strong> <i>CSS</i>支持的浏览器 | <i>font-kerning 属性</i>如下:</p>
<ul>
<li>谷歌浏览器 32.0 -webkit-</li>
<li>浏览器 10.0</li>
<li>火狐 34.0</li>
<li>歌剧</li>
<li>Safari 7.0 </li>
</ul>
<div class="_ap_apex_ad" id="82d2079a-8120-480f-9fc7-5cda825d56e7" style="min-height:280px"></div>
<p></p></div>
</article>

                </div>

            </div>
        </div>
    </div>
</div>


  
<footer>
    <div class="bg-white text-center pb-1">
        <p class="text-body-tertiary pt-3 lh-lg text-opacity-50" id="footer-text">Copyright © 2020 - 2024 版权所有
            <br>

            <a href="https://beian.miit.gov.cn/" target="_blank"
                class="text-opacity-50 text-body-tertiary mt-1 mb-1">蜀ICP备20006366号-1</a>

            <br>
            Made with ❤️ in Chengdu
        </p>
    </div>
</footer>


  <!-- 引入Bootstrap JavaScript库 -->
  <script src="https://unpkg.com/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
    crossorigin="anonymous"></script>

  <!-- 引入Meilisearch搜索相关的JavaScript库 -->
  <script
    src="https://cdn.jsdelivr.net/npm/@meilisearch/instant-meilisearch/dist/instant-meilisearch.umd.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/instantsearch.js@4"></script>
  <script src="https://imangodoc.com/static/javascript/meili_custom.js"></script>

  <!-- 引入prismjs代码高亮相关的JavaScript库 -->
  <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/toolbar/prism-toolbar.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
  <script
    src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"></script>

</body>


</html>