Location>code7788 >text

Use of the iconfont icon library

Popularity:190 ℃/2024-11-17 22:19:50
  • colored icon

Colored icons are used --- select the Symbol one. (If you don't know how to do this, see the steps) --- Note that this one introduces js !!!!!!!!!!!!!!!!!!!!

The code is as follows:

// 1. Introduced in
import '@/assets/iconfont/font_4747698_sfed2xgfhfc/'


// 2. Can be used directly
<div>
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-shejiaotubiao-06"></use>
</svg>
</div>

 

You can see how this works here: -- the first step here is actually the introduction;

-- The second part here is actually a style setting for the colored icon, if you don't add this, the colored icon will be very large when introduced, and after adding it, it will become as small as normal, depending on yourself, it doesn't matter if you add it or not.

-- The third step here is to use the colored icons, and if you want to use the style that he's set up for you, which is the style from the second step, you just add this class to the <svg> tag.