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: "";
}
First step is to add the link of material-icons font library in the <head> section of your HTML file. Here is how you do it. Once you have added the link of the material-icons library, the next step is to add the class “material-icons” in the <i> or <span> tag of the <body> section and also add the name of the icon.
See also Google's list: codepoints. To use a Material Icon as CSS pseudo content (:before, :after): xe23c becomes content:"\e23C" . You can use ligatures in pseudo elements, but this will not be supported in IE9. For more stuff, visit me at btn.
Using the Icon Google's Material Icons provides a long list of icons. Choose any one of them and add the name of the icon class to any HTML element within the < body > tag. In the following example, we have used the icon named accessibility that belongs to the action category.
Update on 2018
Google removed the codes which were displayed earlier for IE9 and below. To get the codes visit the codepoints file in the GitHub repository.
Link to codepoints in GitHub repository: https://github.com/google/material-design-icons/blob/master/font/MaterialIcons-Regular.codepoints
Step 1: Include the Material Icons Stylesheet.
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
Step 2 :
CSS Code:
.bullet li a:before {
font-family: "Material Icons";
content: "\e5cc";
}
Explanation: The value e5cc
is the code which you see for the chevron.
::before {
font-family: 'Material Icons';
content: "\E87C";
}
::after {
font-family: 'Material Icons';
content: "face";
}
http://codepen.io/estelle/pen/MwvOjd
Try this.
.bullet li a:before {
font-family: FontAwesome;
content: "\f054";
}
You can refer here for content values
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With