.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
根据this https://css-tricks.com/almanac/properties/f/font-stretch/,这就是原因:
为了使用font-stretch
并看到某种结果,字体
所使用的表面必须与给定的值相匹配。其他
字,font-stretch
不适用于任何字体,而仅适用于字体
设计有与定义尺寸相匹配的不同面。
所以这是notIE11 问题。
这是您的代码片段(未设置字体):
.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>
Note:
- 请记住,这是CSS3属性,并且仍然没有在浏览器中广泛使用,只有IE9+和Firefox 9+。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)