繁体   English   中英

如何在 web 页面中使用材质图标

[英]How can I use material icon in the web page

我添加了

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

index.html

但我无法在 web 页面上显示图标,它将图标名称显示为字符串。

我试过了

<span class="material-icons-outlined">
  done
</span>

但它不起作用。

您可以使用此代码在 web 页面上显示材料图标

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>

<i class="material-icons">cloud</i>
<i class="material-icons" style="font-size:48px;">cloud</i>
<i class="material-icons" style="font-size:60px;color:red;">cloud</i>

</body>
</html>

例子

 <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <i class="material-icons">cloud</i> <i class="material-icons" style="font-size:48px;">cloud</i> <i class="material-icons" style="font-size:60px;color:red;">cloud</i>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM