字体拉伸属性不适用于IE11

时间:2015-07-22 01:33:17

标签: html css internet-explorer-11

.bord {
  border: 1px solid black;
  font-stretch: extra-condensed;
}
<div class="bord">
  Hello, there is an error in your code. Also the content does not condense as desired
</div>

bord包含font-stretch css属性,但似乎不适用于IE11

1 个答案:

答案 0 :(得分:1)

根据this,原因如下:

  

为了使用font-stretch并查看某种结果,字体   被使用必须有一个与给定值相匹配的面。其他   单词,font-stretch不适用于任何字体,只适用于字体   使用与定义尺寸匹配的不同面设计。

所以这是 IE11问题。

这是一个代码片段(没有字体集):

.bord {
  border: 1px solid black;
  font-stretch: extra-condensed;
}
<div class="bord">
  Hello, there is an error in your code. Also the content does not condense as desired
</div>

这是一个带字体集的片段(可以拉伸/浓缩):

div {
  border: 1px solid black;
  font-family: arial;
}
.bord {
  font-stretch: extra-condensed;
}
<div class="bord">
  Hello, there is an error in your code. Also the content does not condense as desired
</div>
<hr />
<div>
  Hello, there is an error in your code. Also the content does not condense as desired
</div>

注意:

  • 请记住这是CSS3属性,并且仍然没有在浏览器中广泛使用,只有IE9 +和Firefox 9 +。