Skip to content

Instantly share code, notes, and snippets.

@Deri-Kurniawan
Last active December 1, 2023 07:22
Show Gist options
  • Save Deri-Kurniawan/e3ea0bac9367301fcaa3ca5ab51a951e to your computer and use it in GitHub Desktop.
Save Deri-Kurniawan/e3ea0bac9367301fcaa3ca5ab51a951e to your computer and use it in GitHub Desktop.
<div className="max-w-screen-2xl">
<div className="flex flex-wrap">
{Array.from({ length: 400 })
.fill(0)
.map((_, i) => (
<div
key={i.toString()}
className="animated-item h-16 w-16 rounded-md border-[0.1px] border-black/20 transition-all duration-500 ease-linear hover:bg-primary"
/>
))}
</div>
</div>
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.animated-item {
animation: fadeIn 0.5s ease-in-out;
opacity: 0;
}
.animated-item:hover {
animation: none; /* Disable animation on hover if needed */
opacity: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment