Image fade in effect using CSS. (original youtube video included)

I am following this youtube video for a simple thumb gallery web app.

However after keying in everything the author did, I cannot get the fade in effect to work.
The image will become blank after one second.

Where did I do wrong?

Here is the original video

Here is my codepen


// css
opacity 1; // opacity: 1
// js
setTimeout(()=>current.classList.Remove('fade-in'),500); // .remove

thank you! was new to this and sublime somehow suggested me the Remove part…lol.

1 Like