Vis*_*a S 27

2018年更新

谷歌删除了之前为IE9及以下版本显示的代码.要获取代码,请访问GitHub存储库中的codepoints文件.

链接到GitHub存储库中的代码点:https://github.com/google/material-design-icons/blob/master/iconfont/codepoints


第1步:包含材料图标样式表.

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

第2步 :

CSS代码:

.bullet li a:before {
    font-family: "Material Icons";
    content: "\e5cc";
}
Run Code Online (Sandbox Code Playgroud)

说明:该值e5cc是您为V形符号看到的代码.

在此输入图像描述

  • 对于支持CSS功能[`font-feature-settings`](https://developer.mozilla.org/en-US/docs/Web/CSS/font-feature-settings)的现代浏览器,您只需使用图标的名称即可而不是代码点:`.bullet li a:before {font-family:“ Material Icons”; content:“ chevron_right”}` (2认同)

Fun*_*Doc 7

2022 年更新

使用概述的新材料符号

.selector::before {
    font-family: "Material Symbols Outlined";
    content: "\e5cc";
}
Run Code Online (Sandbox Code Playgroud)

参考这里


Bha*_*hah 5

尝试这个。

.bullet li a:before {
    font-family: FontAwesome;
    content: "\f054";
}
Run Code Online (Sandbox Code Playgroud)

您可以在此处参考内容值


Dan*_*iaz 5

::before {
    font-family: 'Material Icons';
    content: "\E87C";
}

::after {
    font-family: 'Material Icons';
    content: "face";
}
Run Code Online (Sandbox Code Playgroud)

http://codepen.io/estelle/pen/MwvOjd