Simplest Modal Window In Pure CSS

Category: CSS & CSS3 , Modal & Popup | August 11, 2017
Views Total:878 views
Official Page:Go to website
Last Update:August 11, 2017


Simplest Modal Window In Pure CSS


This is the simplest CSS solution to create a sliding modal window with CSS3 animations. Without checkbox/radio/label hacks. Smooth animations based on CSS transforms and transitions.

How to use it:

Load the core stylesheet modal.css in the document’s head section.

<link rel="stylesheet" href="css/modal.css">

Create the modal window with a close link.

<div class="modal" id="lightbox">
  <div class="modal-container">
    <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
    <a href="#">Close</a>

Create a link to launch the modal window.

<a href="#lightbox">CLICK ME</a>

You Might Be Interested In:

Leave a Reply