, W3Schools is optimized for learning and training. background-color:red; Now consider you want to fade out text in a div whose id name is fade-out. web designs. One display:none fadeOut animation replacement with pure CSS3 animations, just set This doesnt do anything yet because we still need to create the effect using keyframes. This is the working code for your question. You don't need animations for simple effects. One popular type of animation that can be effectively used by nearly any brand is the fade transition. To demonstrate opacity transitions, lets look at a fade-in image transition. Instead, every design choice must be justified in terms of what it contributes to (or detracts from) the user experience (UX). The animation is created by gradually changing from one set of CSS styles to another. A name identifying the keyframe list. w3-animate-zoom. I got that, but one more question, Why does the hidden div come back the fade out? You may also want to fade out the text on hover and make it expand. 2. You can adjust 5s to any span of time you want. Free and premium plans, Sales CRM software. Required. The animation can be applied to text or images. speed slowfast . display: none; We're committed to your privacy. display: none; 2s fade out. Learn more. G'day! So no need of any click. This assigns an animation called fadeIn to our div. 3. Since display is not one of the animatable CSS properties. On hover we move it to zero.