如何使用Google Material Icon设置CSS content属性? [英] How to set the CSS content property with a Google Material Icon?
问题描述
如何插入Google物料图标雪佛龙图标右侧"( https://design.google .com/icons/#ic_chevron_right )显示在以下CSS内容属性中:
How can I insert the Google Material Icon "chevron icon right" (https://design.google.com/icons/#ic_chevron_right) in the following CSS content property:
.bullet li a:before {
content: "";
}
推荐答案
2018年更新
Google删除了先前在IE9及以下版本中显示的代码.要获取代码,请访问GitHub存储库中的codepoints文件.
Google removed the codes which were displayed earlier for IE9 and below. To get the codes visit the codepoints file in the GitHub repository.
链接到GitHub存储库中的代码点: https://github .com/google/material-design-icons/blob/master/iconfont/codepoints
Link to codepoints in GitHub repository: https://github.com/google/material-design-icons/blob/master/iconfont/codepoints
第1步:包括材质图标样式表".
Step 1: Include the Material Icons Stylesheet.
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
第2步:
CSS代码:
.bullet li a:before {
font-family: "Material Icons";
content: "\e5cc";
}
说明:值e5cc
是您看到的人字形代码.
Explanation: The value e5cc
is the code which you see for the chevron.
这篇关于如何使用Google Material Icon设置CSS content属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!