undefinedfix
Sign in

What's wrong with the font icon of element UI?

Damir edited in Thu, 27 Oct 2022

The introduction of element UI JS (the simplest way of writing) into HTML doesn't match any framework, and the font icon of element UI can't be displayed. What's wrong? I have downloaded the TTF / wof file to the font folder in the CSS directory

1 Replies
fearhack
commented on Fri, 28 Oct 2022

It's not the font folder, it's the fonts folder. I'll tell you more about the loss of this font. You can see more clearly. If you look at the source code in CSS, the fonts folder should also be in the CSS directory

If the directory is right, let's see if the CSS version and fonts are in the same version. Don't mess up. I'm directly in the node of other Vue projects_ It is copied from modules and can be downloaded from node_ Find the element UI folder of modules, and copy the file in lib index.js , copy the index.css And fonts folder, page import index.css and index.js It can be used; Not at node_ Modules copies can also be downloaded from https://unpkg.com/browse/elem... , pay attention to choose the version, directory and node you want_ Modules in the same, a total of four files, do not make less

If all of the above are correct, let's see if the font CSS is covered by other styles. Sometimes it may be covered by the font family written on the page. The figure below shows the font covered. This is the pit I have encountered. It's tears to say it

lock This question has been locked and the reply function has been disabled.