Modal popups are essential UI components for alerts, login forms, image galleries, and confirmation dialogs. This collection shows multiple ways to build them with pure CSS — no JavaScript framework required.
Techniques include: the :target pseudo-class method (URL hash-based), checkbox hack (no URL change), and JavaScript-enhanced modals with smooth animations. Each example includes a semi-transparent overlay backdrop and centered modal content.
Accessibility note: For production use, consider adding keyboard trap support (Escape to close) and ARIA attributes. Several demos show how to integrate these enhancements with minimal JavaScript.