After iconfont is installed, the icon is referenced by symbol, some ICONS can not change the color of the solution, some can.

<svg class="icon" aria-hidden="true" style="color:red;">
    <use xlink:href="#icon-PDF"></use>
</svg>
Copy the code

The reason:

When from ali gallery icon is added to the project, if the color of the edited program icon or icon itself is colored, so through the symbol for icon will increase the fill attribute in the SVG path, lead to can’t change the color, if you need to dynamically modify the color, need new add the icon icon colorless (itself), Gets the program to delete the fill attribute in the SYMBOL’s js file.

Solutions:


Fill =”#……” To replace. = =

On iconfont. Cn, select all files in the project and apply batch operation –> batch decolorization ==