<material-icon icon = "datas/icons/logo.svg"> </material-icon>
它不起作用..
我想作为icon属性的参数给出的路径存在问题。想知道这个图标文件夹的实际位置。 (顺便说一下,我正在使用凉亭下载软件包)
答案 0 :(得分:0)
我认为有一种更简单的方法来使用材质图标,这就是我使用它们的方式。
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<i class="material-icons">face</i>
/* Rules for sizing the icon. */
.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }
/* Rules for using icons as black on a light background. */
.material-icons.md-dark { color: rgba(0, 0, 0, 0.54); }
.material-icons.md-dark.md-inactive { color: rgba(0, 0, 0, 0.26); }
/* Rules for using icons as white on a dark background. */
.material-icons.md-light { color: rgba(255, 255, 255, 1); }
.material-icons.md-light.md-inactive { color: rgba(255, 255, 255, 0.3); }
&#13;
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<i class="material-icons">face</i>
<i class="material-icons md-18">face</i>
<i class="material-icons md-24">face</i>
<i class="material-icons md-36">face</i>
<i class="material-icons md-dark">face</i>
<i class="material-icons md-dark md-inactive">face</i>
&#13;
答案 1 :(得分:0)