Guys, DO NOT use display:none to hide things and show them after, with a script maybe. use visibily hidden instead!!
If you are making a pop up box, for example, and want it to fade in and out, you’ll see that only the fade in works with transition, and the fade out don’t.
Like I did in this demo, I combined visibility with opacity, as I’ve learned with this tutorial. So when you need to hide and show something and with a animation (fade in or transition), do not use display block!
.div{ visibility:hidden; transition:visibility .3s, opacity .3s; opacity:0; } .div-after{ visibility:visible; opacity:1 }











