cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

              <h2>Responsive Loading image Blur effect</h2>

<div class="placeholder" data-large="https://cdn-images-1.medium.com/max/2000/1*XtTMZ5cZ2KWWVFATIr3dpQ.png">
  <img src="https://cdn-images-1.medium.com/freeze/max/30/1*XtTMZ5cZ2KWWVFATIr3dpQ.png?q=20" class="img-small">      
  <div style="padding-bottom: 50%;"></div>     

<h2>Multiple Images</h2>

<div class="placeholder" data-large="https://cdn-images-1.medium.com/max/800/1*JjQfjj2Bez6chdjenCv73g.png">
  <img src="https://cdn-images-1.medium.com/freeze/max/30/1*JjQfjj2Bez6chdjenCv73g.png?q=20" class="img-small">      
  <div style="padding-bottom: 50%;"></div>     

  text-align: center;
  font-family: 'Arial',sans-serif;
  font-size: 30px;
  font-weight: normal;
  padding: 50px 0;

.placeholder {
  background-color: #f6f6f6;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
.placeholder img {
  position: absolute;  
  opacity: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 1s linear;

.placeholder img.loaded {
  opacity: 1;

.img-small {
  filter: blur(50px);
              window.onload = function() {
  var placeholders = document.querySelectorAll('.placeholder');
  for (var i = 0; i < placeholders.length; i++) {

  function loadImage(placeholder) {
    var small = placeholder.children[0];

    // 1: load small image and show it
    var img = new Image();
    img.src = small.src;
    img.onload = function() {

    // 2: load large image
    var imgLarge = new Image();
    imgLarge.src = placeholder.dataset.large;
    imgLarge.onload = function() {
Loading ..................