目录

font-stretch

描述 (Description)

font-stretch属性使文本字符比font.s默认字符宽度更宽或更窄。

可能的值 (Possible Values)

  • ultra-condensed - 元素中的文本字符将极度缩小。

  • extra-condensed - 元素中的文本字符将显着缩小。

  • condensed - 元素中的文本字符将缩小,比值是半压缩的更多。

  • semi-condensed - 元素中的文本字符将略微变窄,使其比值正常时更窄。

  • normal - 元素中的文本字符具有正常宽度。

  • semi-expanded - 元素中的文本字符将略微加宽,使其比值正常时更宽。

  • expanded - 元素中的文本字符将被加宽,使得它们比半扩展值更宽。

  • extra-expanded - 元素中的文本字符将被大大扩展,使它们比扩展值时更宽。

  • ultra-expanded - 元素中的文本字符将被极大地扩展,使得它们比值扩展时更宽。

  • wider - 元素中文本字符的宽度将宽于其父元素的宽度。

  • narrower - 元素中文本字符的宽度将窄于其父元素的宽度。

适用于 (Applies to)

所有HTML元素。

DOM语法 (DOM Syntax)

object.style.fontStretch = "expanded";

例子 (Example)

以下是使用此属性的示例 -

<html>
   <head>
   </head>
   <body>
      <p <b class="notranslate">style = "font-stretch:ultra-expanded;"</b>>
         If this doesn't appear to work, it is likely that your computer 
         doesn't have a <br>condensed or expanded version of the font being used.
      </p>
   </body>
</html> 

这将产生以下结果 -

新页面打开
↑回到顶部↑
WIKI教程 @2018