Загрузка страницы

Modal with HTML, CSS and JavaScript

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/xxxgomO
Modal Examples based on this Project: https://codepen.io/Coding_Journey/pen/jOOBvqR

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

Affiliate Links*
Bluehost Web Hosting: https://www.bluehost.com/track/codingjourney/

*By making a purchase through any of my affiliate links, I'll receive a small commission at no additional cost to you. This helps support the channel and allows me to continue creating videos like this. Thank you for your support!

Suggested Videos:
Share Selected Text with JavaScript: https://www.youtube.com/watch?v=HOrViIclSjw
HTML Drag and Drop API: https://www.youtube.com/watch?v=7HUCAYMylCQ
Marquee-like Content Scrolling (HTML & CSS): https://www.youtube.com/watch?v=sVZX0XvEBhk
Simple Auto-Playing Image Slideshow (HTML, CSS and JavaScript): https://www.youtube.com/watch?v=o_hRhTZORNY
Animations with Animate.css: https://www.youtube.com/watch?v=FYtCTt7sKwY

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

Subscribe 💖
https://www.youtube.com/channel/UCwpH4liYtBSiVXSfL8x2TyQ?sub_confirmation=1

Видео Modal with HTML, CSS and JavaScript канала Coding Journey
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
10 ноября 2019 г. 21:45:24
00:40:18
Яндекс.Метрика