使用google api material icons在网页中插入图标

在<head></head>中加入这一句:

<link rel='stylesheet' href='http://fonts.googleapis.com/icon?family=Material+Icons' type='text/css'>

然后在body中加入:

<span class="sidenav-link-icon">
    <i class="material-icons color-red vertical-top">subject</i>
</span>

就可以插入一个红色的地图的图标。

其他图标可以从这个网页中找:https://material.io/icons/

原文地址:https://www.cnblogs.com/lstory/p/7987977.html