Use of the icomoon icon

In the morning, I listened to my colleague introduce the icon of icomoon, searched the use case on the Internet, and found that it is really useful. Just select the corresponding icon on the website: https://icomoon.io/app/    , click the font setting, and then click to download. Unzip the downloaded file, then copy the font folder and style.css to the project, and cite the css for future reference

Reprinted the relevant introduction: Reprinted from: http://blog.csdn.net/u013938465/article/details/50680468

Recently, a lot of projects have used font icons. Everyone knows that font icons can be scaled arbitrarily without distortion, and the number of requests is greatly reduced, which is very easy to use. The following will explain how I generate font icons and apply them based on the .svg file provided by the artist.

With the help of an online generator: https://icomoon.io/app/#/select

1. Enter the URL: the main page


2. Create a new atlas


3. Add .svg pictures (you can use ready-made or customized ones)

Use the ready-to-click Add Icons in red on the page...

Use custom drag and drop directly into the atlas to add



4. Generate font file

(1) Select the icon to be generated (free choice)

(2) Click on the bottom: "Generate Font F"


can be named freely


5. After the modification is completed, click Generate Font


Download to zip file:




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


Click IcoMoon App, enter the page, select the icon you want to import into the web page, and click the edit button, then click the selected icon to edit
After editing, click the generate font button
Click download to download the font style file and get the html escape code of the icon from getCOde

Writing web code

First of all, of course, you need to introduce custom font styles into web pages
  1. @font-face{  
  2.         font-family:‘icomoon’;  
  3.         src:url(‘icomoon.eot’);  
  4.         src:url(‘font/icomoon.eot?#iefix’format(‘embedded-opentype’),  
  5.             url(‘font/icomoon.woff’format(‘woff’),  
  6.             url(‘font/icomoon.ttf’)  format(‘truetype’),    
  7.             url(‘font/icomoon.svg#SofiaProLight’)  format(‘svg’);  
  8.             font-weight:normal;  
  9.             font-style:normal;  
  10.      
  11.         }  
Then write the html code, and describe the css style of the specified tag, and add the icomoon icon to the tag.
  1. <body>  
  2.     < div data-icon = “” > </ div > <!–The icon html escape code obtained before is used to specify which icon to add at this tag–>   
  3.     <divdata-icon=“”></div>   
  4. </body>  


  1. div:after{<!–:before or :after must be written, otherwise the icon cannot be displayed–>  
  2.     font-family:‘icomoon’;  
  3.      content attr (data- icon );<!– here specifies which icon to add to the label–>  
  4.   
  5.     }  

Through the above steps, the icon is displayed




In the morning, I listened to my colleague introduce the icon of icomoon, searched the use case on the Internet, and found that it is really useful. Just select the corresponding icon on the website: https://icomoon.io/app/    , click the font setting, and then click to download. Unzip the downloaded file, then copy the font folder and style.css to the project, and cite the css for future reference

Reprinted the relevant introduction: Reprinted from: http://blog.csdn.net/u013938465/article/details/50680468

Recently, a lot of projects have used font icons. Everyone knows that font icons can be scaled arbitrarily without distortion, and the number of requests is greatly reduced, which is very easy to use. The following will explain how I generate font icons and apply them based on the .svg file provided by the artist.

With the help of an online generator: https://icomoon.io/app/#/select

1. Enter the URL: the main page


2. Create a new atlas


3. Add .svg pictures (you can use ready-made or customized ones)

Use the ready-to-click Add Icons in red on the page...

Use custom drag and drop directly into the atlas to add



4. Generate font file

(1) Select the icon to be generated (free choice)

(2) Click on the bottom: "Generate Font F"


can be named freely


5. After the modification is completed, click Generate Font


Download to zip file:




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


Click IcoMoon App, enter the page, select the icon you want to import into the web page, and click the edit button, then click the selected icon to edit
After editing, click the generate font button
Click download to download the font style file and get the html escape code of the icon from getCOde

Writing web code

First of all, of course, you need to introduce custom font styles into web pages
  1. @font-face{  
  2.         font-family:‘icomoon’;  
  3.         src:url(‘icomoon.eot’);  
  4.         src:url(‘font/icomoon.eot?#iefix’format(‘embedded-opentype’),  
  5.             url(‘font/icomoon.woff’format(‘woff’),  
  6.             url(‘font/icomoon.ttf’)  format(‘truetype’),    
  7.             url(‘font/icomoon.svg#SofiaProLight’)  format(‘svg’);  
  8.             font-weight:normal;  
  9.             font-style:normal;  
  10.      
  11.         }  
Then write the html code, and describe the css style of the specified tag, and add the icomoon icon to the tag.
  1. <body>  
  2.     < div data-icon = “” > </ div > <!–The icon html escape code obtained before is used to specify which icon to add at this tag–>   
  3.     <divdata-icon=“”></div>   
  4. </body>  


  1. div:after{<!–:before or :after must be written, otherwise the icon cannot be displayed–>  
  2.     font-family:‘icomoon’;  
  3.      content attr (data- icon );<!– here specifies which icon to add to the label–>  
  4.   
  5.     }  

Through the above steps, the icon is displayed




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325365221&siteId=291194637