PIXELOG.ME/HAILEY
<[censurado]>
const sparkleCount = 40;
for (let i = 0; i < sparkleCount; i++) {
const sparkle = document.createElement('div');
sparkle.classList.add('sparkle');
sparkle.style.left = Math.random() * 100 + 'vw';
sparkle.style.animationDuration = (6 + Math.random() * 5) + 's';
sparkle.style.animationDelay = Math.random() * 5 + 's';
sparkle.style.opacity = 0.4 + Math.random() * 0.6;
sparkle.style.width = sparkle.style.height = (2 + Math.random() * 4) + 'px';
document.body.appendChild(sparkle);
}
const extraSparkles = 20;
for (let i = 0; i < extraSparkles; i++) {
const sparkle = document.createElement('div');
sparkle.classList.add('sparkle', 'up');
sparkle.style.left = Math.random() * 100 + 'vw';
sparkle.style.animationDuration = (8 + Math.random() * 5) + 's';
sparkle.style.animationDelay = Math.random() * 5 + 's';
sparkle.style.opacity = 0.3 + Math.random() * 0.5;
sparkle.style.width = sparkle.style.height = (2 + Math.random() * 4) + 'px';
document.body.appendChild(sparkle);
}
</[censurado]>
Comentários
Ainda não há comentários.
Você precisa estar logado para comentar.