What is IcoMoon?
IcoMoon is an icon solution, providing three main services: Vector Icon Packs, The IcoMoon App, and hosting icons as SVGs or fonts.
Here's how to use it simply
1. Enter the URL: the main page
Go to the homepage of the website:
Click the icoMoon app button in the upper right corner, select the button, and then enter the following interface:
After clicking the import Icons button, add the svg image, and the following interface will appear. The first four icons below are newly added by me. Then click the Generate Font button in the lower right corner, and the following interface will appear.
Then click the download button to download, and after downloading, you can use it in the code
Use: Put the entire contents of the fonts folder and the style.css file into the corresponding project.
The font can be added by adding the name of the class class generated under the css file to the node corresponding to the html.
Of course, you also need to set font-size to add fonts, and you can also set color to change its color according to the actual situation.
Reprinted from: http://blog.csdn.Net/goodgirl1991/article/details/50416974
icomoon icon is an awesome and practical open source icon series, its official website address is https://icomoon.io/icons.html
Well, let's introduce how to apply this series of icons to web pages.
Download selected icomoon icon
Writing web code
- @font-face{
- font-family:'icomoon';
- src:url('icomoon.eot');
- src:url('font/icomoon.eot?#iefix') format('embedded-opentype'),
- url('font/icomoon.woff') format('woff'),
- url('font/icomoon.ttf') format('truetype'),
- url('font/icomoon.svg#SofiaProLight') format('svg');
- font-weight:normal;
- font-style:normal;
- }
- <body>
- < div data-icon = "" > </ div > <!--The icon html escape code obtained before is used to specify which icon to add at this tag-->
- <divdata-icon=""></div>
- </body>
- div:after{<!--:before or :after must be written, otherwise the icon cannot be displayed -->
- font-family:'icomoon';
- content : attr (data- icon );<!--This specifies which icon to add to the label -->
- }