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

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

#1

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


#2

zhouxiang19910319,

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

#3

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