Simplest Modal Window In Pure CSS

Category: CSS & CSS3 , Modal & Popup | August 11, 2017
Author: louierosero
Views Total: 151
Official Page: Go to website
Last Update: August 11, 2017
License: MIT

Preview:

Simplest Modal Window In Pure CSS

Description:

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>
  </div>
</div>

Create a link to launch the modal window.

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