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

怎么他喵的会有这种事

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

    都是最新版,用了 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  
       246 天前 via Android
    你猜猜是不是所有的系统都支持所有的字体?
    wjpauli
        2
    wjpauli  
    OP
       245 天前
    不是阿大哥,你没有看我的问题么。我左右两个 span ,左面的支持,右面的不支持。
    chnwillliu
        3
    chnwillliu  
       245 天前 via Android
    不要看模板要看最后 render 出来的 DOM 节点。选中那个文字节点,看下 font-family 从哪里来的就知道。说不定有 chrome 插件会往页面塞 CSS 呢。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2878 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 09:31 · PVG 17:31 · LAX 02:31 · JFK 05:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.