Home > Blockchain >  How to fix a double Lottie Animation problem
How to fix a double Lottie Animation problem

Time:11-16

how are you? I'm doing a simple website for a streamer friend. When I was doing the About section, he wanted some images about two things he like the most. But when I insert some Lottie Animation IMG, one of them becomes a double.

I'll put the code for example.

<div class="container">
<div class="row">
    <div class="col">
        <div id="F1"></div></a>
        <script src="lottie.js"></script>
        <script src="script.js"></script>
    </div>
<div class="col">
        <p class="Texto1">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>

I uploaded the website in GitPages, here's the link: https://bauditz.github.io/T0omp---Website-Project/about.html

Thank you for any help!

CodePudding user response:

on your website I can see you're loading your F1 and fries animations twice, I don't think this would solve your problem but it's better to only load them once.

Secondly, I'd recommend you try using lottie-web rather than bodymovin, this is a link to the CDN:

https://cdnjs.cloudflare.com/ajax/libs/lottie-web/5.8.1/lottie.min.js

In your script, you'll have to replace 'bodymovin.loadAnimation' by 'lottie.loadAnimation'

I downloaded your animation and checked on lottiefiles.com it looks fine.

CodePudding user response:

I think your Lottie file include two animation object . delete once object from f1.json or from aftereffect file then export again, enjoy

  • Related