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;}
执行结果