JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lottie Animation</title>
<!-- Подключаем библиотеку Lottie -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/lottie-web/5.12.2/lottie.min.js"></script>
<style>
#animation-container {
width: 400px;
height: 400px;
margin: 20px auto;
background: #f0f0f0;
border-radius: 10px;
}
.explore-link {
display: block;
text-align: center;
margin-top: 20px;
font-size: 18px;
color: #007bff;
text-decoration: none;
}
</style>
</head>
<body>
<!-- Контейнер для анимации -->
<div id="animation-container"></div>
<script>
// Загружаем и воспроизводим анимацию
const animation = lottie.loadAnimation({
container: document.getElementById('animation-container'), // ID контейнера
renderer: 'svg', // Можно выбрать 'svg', 'canvas' или 'html'
loop: true, // Бесконечная анимация
autoplay: true, // Автозапуск
path: 'https://nft.fragment.com/gift/hexpot-10348.lottie.json' // URL JSON-файла
});
// Дополнительные настройки
animation.setSpeed(1); // Скорость воспроизведения (1 = нормальная)
</script>
<!-- Ссылка explore -->
<a class="explore-link" href="https://t.me/apitonBot?start=RVFBNlQxZXQ3WVctajMwV1VianAxM1NXWWdGT0NQYTgwNi12SVhYSU1ZaW4yaEcw" target="_blank">explore</a>
</body>
</html>