Animate from display none

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI22 min

About this video

A CSS tutorial on animating a dialog or modal in and out when it uses display none, a property that cannot be transitioned directly. It works through opening and closing animations, the backdrop, and closing when the user clicks outside the modal.

What you’ll learn

  • Animate an element on open despite display none
  • Animate a closing state before hiding a modal
  • Fade in a backdrop behind a dialog