V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wjpauli
V2EX  ?  Angular

怎么他喵的会有这种事

  •  
  •   wjpauli · 254 天前 · 2290 次点击
    这是一个创建于 254 天前的主题,其中的信息可能已经有所发展或是发生改变。

    腾讯云最新优惠活动来了:云产品限时1折,云服务器低至88元/年 ,点击这里立即抢购:9i0i.cn/qcloud,更有2860元代金券免费领取,付款直接抵现金用,点击这里立即领取:9i0i.cn/qcloudquan

    (福利推荐:你还在原价购买阿里云服务器?现在阿里云0.8折限时抢购活动来啦!4核8G企业云服务器仅2998元/3年,立即抢购>>>:9i0i.cn/aliyun

    都是最新版,用了 sass 和 material 。 模板里这样: <mat-toolbar> 文字 1 <button mat-button>文字 2<button> </mat-toolbar>

    此时文字 1 自动使用了 Material 的 Roboto 字体,但是在我的 windows 10 台式机的 chrome 下,文字 2 却使用了 Arial 字体。在 Windows 11 笔记本的 chrome 下,文字 2 也使用了 Arial 字体,但是好看很多。

    把 sass 改成这样: mat-toolbar button color: red font-family: Roboto, "Helvetica Neue", sans-serif

    发现文字 2 变成了红色,在 windows11 中也使用了 Roboto 字体,但是在 windows10 中居然还保持 Arial 字体。请问这是什么情况?

    3 条回复  ?  2023-08-26 07:33:25 +08:00
    Justin13
        1
    Justin13  
       254 天前 via Android
    你猜猜是不是所有的系统都支持所有的字体?
    wjpauli
        2
    wjpauli  
    OP
       254 天前
    不是阿大哥,你没有看我的问题么。我左右两个 span ,左面的支持,右面的不支持。
    chnwillliu
        3
    chnwillliu  
       254 天前 via Android
    不要看模板要看最后 render 出来的 DOM 节点。选中那个文字节点,看下 font-family 从哪里来的就知道。说不定有 chrome 插件会往页面塞 CSS 呢。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5997 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 03:10 · PVG 11:10 · LAX 20:10 · JFK 23:10
    Developed with CodeLauncher
    ? Do have faith in what you're doing.


    http://www.vxiaotou.com