Modal with HTML, CSS and JavaScript

Publié le: 10 novembre 2019
sur la chaîne: Coding Journey
11,833
311

Learn how to create a modal, from scratch, with HTML, CSS and JavaScript.

A modal is a popup box, usually positioned on top of everything else in the document and it is used to attract the user's attention to some special information or to ask the user to do something (for example to register or login) without navigating to another page.

It is a commonly used component in websites and that's why I thought it would be a good idea to implement it from scratch as an alternative to using some third-party library or framework for this purpose.

In the first half of the video, we create the structure (HTML), styling (CSS) and functionality (JavaScript) for a basic modal, which can be triggered upon a button click and dismissed upon a click over the modal close button or the modal backdrop (background overlay). We then proceed to adding an entrance and exit animation to the modal, and finally, we make the necessary modifications in order to take into account the case where more than one modals exist in our page.

Enjoy 🙂

Don’t forget to share, like, subscribe and I would love to hear your thoughts in the comments section below!

Code for this Project: https://codepen.io/Coding_Journey/pen...
Modal Examples based on this Project: https://codepen.io/Coding_Journey/pen...

Support the Channel 💙☕🙏
PayPal: https://paypal.me/CodingJourney

Suggested Videos:
Share Selected Text with JavaScript:    • Share Selected Text with JavaScript  
HTML Drag and Drop API:    • HTML Drag and Drop API  
Marquee-like Content Scrolling (HTML & CSS):    • Marquee-like Content Scrolling (HTML & CSS)  
Simple Auto-Playing Image Slideshow (HTML, CSS and JavaScript):    • Simple Auto-Playing Image Slideshow (HTML,...  
Animations with Animate.css:    • Animations with Animate.css  

Codepen: https://codepen.io/Coding_Journey/
Twitter:   / codingjrney  
Email: codingjourney123@gmail.com

Subscribe 💖
   / @codingjourney  


Sur cette page du site, vous pouvez voir la vidéo en ligne Modal with HTML, CSS and JavaScript durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Coding Journey 10 novembre 2019, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 11,833 fois et il a aimé 311 téléspectateurs. Bon visionnage!