DEV Community 👩‍💻👨‍💻

Discussion on: Build a Modal (Pop up) With HTML, CSS and JavaScript

Collapse
bushbass profile image
Alex Nielsen

Thank you for the great demo. Is the overlay just there so you can close the modal by clicking outstide the modal or does it serve some other purpose?

Collapse
veedjohnson profile image
Veed - The Hood Developer Author

You're welcome Alex. Asides that, the overlay also makes the modal more visible. If there were many content on the page, the overlay will blur out other contents making the whole focus on the modal itself

Collapse
bushbass profile image
Alex Nielsen

yes, that makes sense. thanks again