Ventana modal más simple en CSS puro

Tiempo de ejecución: 30 minutos. Empezar

Autor: louierosero
Views Total: 1,617
Sitio oficial: Ir a la web
Actualizado: August 11, 2017
Licencia: MIT

Vista prévia

Ventana modal más simple en CSS puro

Descripción

Esta es la solución CSS más simple para crear una ventana modal deslizante con animaciones CSS3. Sin casillas de verificación/radio/etiqueta hacks. Animaciones suaves basadas en transformaciones y transiciones CSS.

Funcionamiento

Cargue la hoja de estilos principal modal. CSS en la sección head del documento.

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

Cree la ventana modal con un vínculo de cierre.

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

Cree un vínculo para iniciar la ventana modal.

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

Te puede interesar: