【问题标题】:Combine all Google Material icon font requests into one将所有 Google Material 图标字体请求合并为一个
【发布时间】:2021-12-22 08:52:29
【问题描述】:

我想知道是否可以将以下所有请求合并为一个。可能吗?如果是,怎么做?

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Outlined" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Round" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Sharp" rel="stylesheet" />
<link href="https://fonts.googleapis.com/css2?family=Material+Icons+Two+Tone" rel="stylesheet" />

【问题讨论】:

    标签: html google-font-api google-fonts


    【解决方案1】:

    您可以简单地堆叠family URL 参数。请注意,我使用了 css2 URL 路径变体。

    <link href="https://fonts.googleapis.com/css2?family=Material+Icons&family=Material+Icons+Outlined&family=Material+Icons+Round&family=Material+Icons+Sharp&family=Material+Icons+Two+Tone" rel="stylesheet" />
    
    <span class="material-icons-outlined">settings</span>
    <span class="material-icons-round">check_circle</span>
    <span class="material-icons-two-tone">account_circle</span>

    【讨论】:

      猜你喜欢
      • 2021-04-01
      • 2016-09-26
      • 1970-01-01
      • 2010-09-11
      • 2020-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多