feat: image load animation

This commit is contained in:
Rico van Zelst
2023-11-07 19:38:34 +01:00
parent b5342fcc9d
commit 790b8d280f
2 changed files with 15 additions and 3 deletions

View File

@@ -3,3 +3,14 @@ import "flowbite";
import "./icons";
import "./icons-brands";
import "./icons-duotone";
document.addEventListener("DOMContentLoaded", function () {
const images = document.querySelectorAll(".transition-opacity");
images.forEach((image) => {
image.onload = function () {
image.style.filter = "blur(0)";
image.style.opacity = "1";
};
});
});