这是关于
https://fonts.googleapis.com/icon
https://fonts.googleapis.com/css
我在使用 Google Fonts 的 Google Material Icons CDN 时注意到这一点的用法。一些来源列出了 fonts.googleapis.com/ css ?family=Material+Icons而其他来源列出了 fonts.googleapis.com/ icon ?family=Material+Icons。两者的工作方式似乎完全相同。我只是想知道是否有人知道任何技术差异?
奇怪的是,我也能做fonts.googleapis.com/icon ?family= Roboto |Noto+Sans之类的事情,我只是好奇。谢谢!
问问题
549 次
1 回答
0
根据 GCP doc CSS API v2,您应该能够使用其他前端或图标系列
<html>
<head>
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Crimson+Pro">
<style>
body {
font-family: 'Crimson Pro', serif;
font-size: 48px;
}
</style>
</head>
<body>
<div>Making the Web Beautiful!</div>
</body>
</html>
此外,您可能会注意到 fonts.googleapis.com/css?family=Material+Icons 和 fonts.googleapis.com/icon?family=Material+Icons 不同的来源 与其他 Google Web 字体类似,将提供正确的 CSS 来激活特定于浏览器的“材料图标”字体。一个额外的 CSS 类将被声明为 .material-icons。使用此类的任何元素都将具有正确的 CSS 以从 Web 字体呈现这些图标。您也许可以在Material Icons Guide中获得更多详细信息
于 2020-06-12T14:32:25.620 回答