[英]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.