目录

font-stretch

font-stretch 字体拉伸属性,对字体进行正常、缩小、或扩大处理。

 

语法

font-stretch: ultra-condensed;

font-stretch: extra-condensed;

font-stretch: condensed;

font-stretch: semi-condensed;

font-stretch: normal;

font-stretch: semi-expanded;

font-stretch: expanded;

font-stretch: extra-expanded;

font-stretch: ultra-expanded;

描述
normal指定正常字体。
semi-condensed, condensed, extra-condensed, ultra-condensed指定的字体为缩小字体。
semi-expanded, expanded, extra-expanded, ultra-expanded指定的字体为扩大字体。

例子

HTML

<div class="ultra stretch"> This is text with the font extremely expanded</div>
<div class="stretch"> This is text with the font stretched</div>
<div class="normal"> This is text without font stretching</div>
<div class="condensed"> This is text with the font condensed</div>
<div class="ultra condensed"> This is text with the font extremely condensed</div>

CSS

.ultra.stretch{font-stretch: ultra-expanded;}
.stretch {font-stretch: expanded;} 
.normal {font-stretch: normal;}
.condensed {font-stretch: condensed;}
.ultra.condensed {font-stretch: ultra-condensed;}

执行结果

This is text with the font extremely expanded
This is text with the font stretched
This is text without font stretching
This is text with the font condensed
This is text with the font extremely condensed

参考

相关链接

外部链接