How To Create a Simple Modal Window In Pure CSS

A simple CSS library that allows you to create modal windows using pure CSS/CSS3. Animated with transitions and CSS3 transitions.

modal popup in html, how to create popup in html with css, javascript modal popup, css modal popup

How to make use of it:

1. Load the modal.css core CSS file in the header section of the document.

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

2. Create modal content as follows:

<div class="modal" id="demo">
  <div class="modal-container">
    <p>I love cats</p>
    <a href="#modal-close">Close</a>

3. Create a link to toggle the modal window.

<a href="#demo">demo</a>

4. Override default CSS styles to your taste.

p { margin-top: 0; }
.modal-container {
  position: fixed;
  background-color: #fff;
  width: 70%;
  max-width: 400px;
  left: 50%;
  padding: 20px;
  border-radius: 5px;
  -webkit-transform: translate(-50%, -200%);
  -ms-transform: translate(-50%, -200%);
  transform: translate(-50%, -200%);
  -webkit-transition: -webkit-transform 200ms ease-out;
  transition: transform 200ms ease-out;

Read More –

Modal Window Based On jQuery and GSAP With Motion Blur Effect
[No Script] A 100% JavaScript-free Modal Window

Pretty Simple Modal Window, pureCSSModal Plugin/Github

See Demo And Download

Official Website(jreyes88): Click Here

This superior jQuery/javascript plugin is developed by jreyes88. For extra Advanced Usage, please go to the official website.