How to Open Popup Modal using Pure CSS NO!! Javascript

How to Open Popup Modal using Pure CSS NO!! Javascript – In this tutorial I am going to share simple lightweight CSS only plugin to open Quick Modal/Popup on button click without Javascript. This plugin create bootstrap like Model to display your inline HTML content in Popup Window without javascript.
Open Popup Modal using Pure CSS

Creating Popup Modal In Pure CSS


Include CSS library on page to open popup window.

<link href="modals.css" rel="stylesheet">


Creating Modal window which will display on button click.

<div class="modal">
  <div class="modal-header">
    <h3>Modal Title</h3>
    <label for="modal">
  <p>Modal Content</p>

Create the background overlay of the modal window.

<label for="modal" class="modal-background"></label>

Finally Create toggle button to open/close modal window.

<input type="checkbox" id="modal">
<label for="modal" class="example-label">Open Modal</label>

See live demo and download source code.


Visit official github repository for more information and follow for future updates. Don’t forget to read license for using this plugin in your projects.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.