[英]How I can use icons provided by useanimations.com in my project
I am trying to use icons provided by useanimations.com in my project but after downloading a specific icon, I don't know what to do with the json file of icon...and somehow also the animation in not running?我正在尝试在我的项目中使用由 useanimations.com 提供的图标,但在下载特定图标后,我不知道如何处理图标的 json 文件......不知何故动画没有运行? please help
请帮忙
This site explains how to set up the Lottie Player to run the animations and then link to the animations.该站点解释了如何设置 Lottie Player 以运行动画,然后链接到动画。
https://lottiefiles.com/blog/working-with-lottie/how-to-add-lottie-animation-in-web-page https://lottiefiles.com/blog/working-with-lottie/how-to-add-lottie-animation-in-web-page
Step 1: Add the following script to the head section of the page:步骤1:在页面的head部分添加以下脚本:
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
Step 2: Get the URL of the animation either by uploading it to your website or use the public link第 2 步:通过将动画上传到您的网站或使用公共链接来获取动画的 URL
Step 3: Copy and paste the below code where you want it to appear on your site.第 3 步:将以下代码复制并粘贴到您希望它出现在您网站上的位置。 The URL should be the link to the Lottie animation file.
URL 应该是 Lottie 动画文件的链接。
<lottie-player src="<URL HERE>" background="transparent" speed="1" style="width: 300px; height: 300px;" loop controls autoplay></lottie-player>
That's it.而已。
Use Lotties player使用Lotties播放器
Source : https://lottiefiles.com/web-player来源: https : //lottiefiles.com/web-player
<script src="https://unpkg.com/@lottiefiles/lottie-player@0.4.0/dist/lottie-player.js"></script> <lottie-player id="firstLottie" src="https://assets8.lottiefiles.com/packages/lf20_rx3jheuy.json" style="width:200px; height: 200px;" autoplay loop></lottie-player>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.