fix fadein transtion
This commit is contained in:
parent
c13626ce09
commit
c65f5f228b
2 changed files with 7 additions and 8 deletions
|
|
@ -203,6 +203,7 @@
|
|||
}
|
||||
|
||||
img {
|
||||
opacity: 0;
|
||||
transition: var(--transition-image-opacity);
|
||||
}
|
||||
img.show {
|
||||
|
|
|
|||
|
|
@ -22,15 +22,13 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
});
|
||||
|
||||
nodes.images.forEach((image) => {
|
||||
setTimeout(() => {
|
||||
if (image.complete) {
|
||||
if (image.complete) {
|
||||
show(image);
|
||||
} else {
|
||||
image.addEventListener("load", () => {
|
||||
show(image);
|
||||
} else {
|
||||
image.addEventListener("load", () => {
|
||||
show(image);
|
||||
});
|
||||
}
|
||||
}, 10);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Key shortcuts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue