解决字体拉伸属性无法启动的方法
P粉676821490
P粉676821490 2023-08-26 14:42:23
[CSS3讨论组]

font-stretch属性根本不起作用。这是我的代码:

<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8">
  <title>font-stretch</title>
  <style>
   p {
    font-size: 5em;
    font-family: 'Myriad Pro';
   }
  </style>
 </head>
 <body>
  <p>
   <span style="font-stretch: ultra-condensed">P</span>
   <span style="font-stretch: extra-condensed">P</span>
   <span style="font-stretch: condensed">P</span>
   <span style="font-stretch: semi-condensed">P</span>
   <span style="font-stretch: normal">P</span>
   <span style="font-stretch: semi-expanded">P</span>
   <span style="font-stretch: expanded">P</span>
   <span style="font-stretch: extra-expanded">P</span>
   <span style="font-stretch: ultra-expanded">P</span>
  </p>
 </body>
</html>

我已经尝试了很多其他字体,问题仍然存在。请帮忙解决

P粉676821490
P粉676821490

全部回复(1)
P粉787934476

您可以使用font-stretch来选择这些字体中的紧缩或扩展字体。如果您使用的字体没有提供紧缩或扩展字体,则此属性无效。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号