Sarah.M
Sarah.M

Reputation: 7

Lord icon not rendering in browser

I am trying to use lordicon in my website, I added it successfully as gif and png. but i need to make it animate on hover only, I used its editor and download it as JSON and added this code in my html page:

<lord-icon src="/627-brezel-outline.json" animation="hover"></lord-icon>

but nothing show in the browser. Can you help me please.

Upvotes: -1

Views: 1024

Answers (2)

Rytis
Rytis

Reputation: 11

<script src="https://cdn.lordicon.com/lordicon.js"></script>
<lord-icon src="https://cdn.lordicon.com/rpviwvwn.json" trigger="loop" colors="primary:#121331,secondary:#f06548" style="width:80px;height:80px"></lord-icon>

Upvotes: 0

benjamingranados
benjamingranados

Reputation: 528

Did you include the project files of the GitHub repository? There are some implementation examples in there. An easier way is just to embed the HTML code with the settings you want from their website! Is the easiest way in fact!

Just select an icon, choose your settings and in the download window, instead of downloading a file, select "EMBED HTML".

Upvotes: 1

Related Questions