Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <body>
  <div class="bg-texture"></div>
  <div class="blur"></div>
  <div class="lantern-wrap">
    <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="263.999px" height="464.681px" viewBox="0 0 263.999 464.681" enable-background="new 0 0 263.999 464.681" xml:space="preserve">
<path opacity="0.5" fill="#010101" d="M263.957,129.957c-0.001-0.666-0.085-1.447-0.361-2.385c-0.206-0.697-0.591-1.487-1.165-2.209
	c-0.426-0.542-0.975-1.029-1.547-1.406c-0.868-0.572-1.781-1.213-2.617-1.396c-0.838-0.182-1.632-0.559-2.424-0.559h-18.59
	l-53.441-85.96c-0.903-1.462-2.546-2.04-4.309-2.04h-8.502V23.071c0-0.502-0.087-1.061-0.256-1.698
	c-0.131-0.476-0.351-0.999-0.675-1.535c-0.477-0.801-1.3-1.623-2.29-2.132c-0.989-0.52-2.062-0.703-2.949-0.703h-12.484
	c-0.34-2-0.847-2.893-1.507-4.226c-1.918-3.878-5.052-7.067-8.89-9.289C138.108,1.267,133.534,0,128.665,0
	c-6.494,0.002-12.455,2.246-16.869,6.021c-2.206,1.889-4.029,4.172-5.306,6.755c-0.66,1.334-1.167,2.226-1.507,4.226H91.081
	c-0.796,0-1.47,0.125-2.106,0.315c-0.949,0.298-1.825,0.719-2.731,1.515c-0.446,0.403-1.045,0.917-1.429,1.621
	c-0.382,0.695-0.812,1.614-0.812,2.617v10.933h-7.025c-1.844,0-3.542,0.658-4.418,2.226L24.42,122.003H10.818
	c-2.932,0-5.483,1.233-7.299,2.595c-0.914,0.684-1.662,1.622-2.253,2.528c-0.294,0.456-0.625,1.026-0.829,1.595
	C0.238,129.29,0,130.018,0,130.84v9.289c0,1.258,0.142,2.438,0.55,3.796c0.157,0.506,0.409,1.036,0.713,1.565
	c0.521,0.927,1.381,1.826,2.315,2.417c0.697,0.45,1.42,0.744,2.073,0.937c0.985,0.29,1.851,0.711,2.677,0.772
	c0.827,0.056,1.633,0.388,2.489,0.388h12.882l33.289,172.342c-0.002,0.08-0.004-0.007-0.004,0.082
	c0.001,0.797,0.073,1.855,0.435,3.206c0.271,1.012,0.712,2.105,1.429,3.251c1.062,1.722,2.466,3.412,4.826,4.544
	c0.823,0.4,2.325,0.688,2.325,0.95v12.908c0,0.521,0.405,1.103,0.588,1.756c0.138,0.487,0.528,1.019,0.868,1.555
	c0.498,0.805,1.415,1.427,2.395,1.91c0.979,0.498,2.104,0.496,2.98,0.496h15.212c3.462,4,10.456,9.631,17.372,18.168
	c4.817,5.939,9.582,12.97,13.097,20.381c3.333,7.018,5.508,14.473,5.731,21.875c-4.043,1.31-7.667,3.54-10.588,6.406
	c-4.853,4.745-7.854,11.346-7.853,18.567c-0.002,7.222,3,13.812,7.853,18.56c4.843,4.753,11.607,7.722,19.037,7.72
	c7.428,0.002,14.192-2.962,19.034-7.716c4.854-4.746,7.854-11.332,7.854-18.554c0.002-7.223-3-13.811-7.854-18.557
	c-3.267-3.205-7.412-5.596-12.044-6.812c0.227-6.464,2.295-13.439,5.489-20.282c5.071-10.902,12.863-21.379,19.375-29.042
	c3.256-3.835,6.189-7.151,8.301-9.322c0.439-0.452,0.832-1.393,1.194-1.393h10.926c0.777,0,1.719,0.043,2.654-0.387
	c0.697-0.318,1.359-0.713,1.855-1.263c0.757-0.827,1.618-1.666,1.808-2.361c0.186-0.708,0.714-1.229,0.714-1.706V335.12
	c1-0.06,1.234-0.324,1.972-0.804c0.241-0.161,1.675-1.267,3.587-3.354c0.951-1.047,1.843-2.346,2.729-3.922
	c0.883-1.573,1.577-3.436,1.957-5.55c0.019-0.103,0.057-0.449,0.152-0.935c0.781-3.82,3.548-16.787,7.262-33.998
	c5.575-25.834,13.261-61.311,19.56-90.327c3.15-14.508,5.948-27.079,7.96-36.345c0.919-4.223,1.666-7.884,2.216-9.884h15.974
	c1.203,0,2.359-0.418,3.649-0.841c0.955-0.314,2.002-1.05,2.824-1.891c0.621-0.622,1.077-1.433,1.36-2.101
	c0.433-1.015,0.613-1.899,0.676-2.572c0.053-0.677,0.124-1.259,0.124-1.74v-10.15C264.001,130.465,263.957,130.23,263.957,129.957z
	 M161.001,27.003v6h-67v-6H161.001z M115.555,16.964c0.989-2.007,2.71-3.824,4.983-5.139c2.27-1.313,5.064-2.112,8.127-2.111
	c4.081-0.002,7.694,1.423,10.21,3.581c1.257,1.078,2.239,2.33,2.899,3.67c0.006,0.012,0.01,0.039,0.016,0.039h-26.252
	C115.544,17.003,115.548,16.977,115.555,16.964z M79.97,43.003h96.688l48.888,79H35.841L79.97,43.003z M11.001,139.639v-7.225
	c0-0.031-0.443-0.411-0.183-0.411h16.597h206.992h18.594v8H10.818C10.594,140.003,11.001,139.642,11.001,139.639z M181.001,344.003
	h-104v-9c2,0,5.754,0,9.825,0c21.305,0,60.009,0,83.679,0c3.96,0,7.496,0,10.496,0V344.003L181.001,344.003z M136.013,325.003
	c-16.074,0-32.618,0-44.922,0c-2.212-13-9.382-55.039-16.176-95.252c-3.602-21.311-7.095-41.943-9.69-57.458
	c-1.297-7.758-2.368-13.833-3.113-18.391c-0.279-1.7-0.513-2.899-0.694-3.899h138.27l-33.367,175
	C157.385,325.003,146.81,325.003,136.013,325.003z M33.919,150.003h17.335c0.089,0,0.198,0.934,0.331,1.761
	c2.113,13.146,9.679,57.648,16.723,99.281c5.43,32.083,10.542,61.958,12.603,73.958c-3.777,0-6.572,0-8.077,0
	c-0.074,0-0.161,0-0.229,0c-1.923,0-3.117-0.086-3.822-0.377c-0.532-0.225-0.812-0.33-1.017-0.524
	c-0.294-0.286-0.46-0.542-0.583-0.921c-0.121-0.368-0.152-0.835-0.149-1.023l0.002-0.153h-0.007c0.046,0,0.032-0.509-0.054-0.962
	L33.919,150.003z M104.52,357.036c-1.318-1.392-2.588-3.033-3.784-4.033h26.266v36.113c0-0.407-0.386-0.901-0.577-1.305
	C120.489,375.411,111.758,364.671,104.52,357.036z M149.535,438.411c-0.001,4.604-1.895,8.725-4.955,11.729
	c-3.07,2.998-7.238,4.825-11.887,4.827c-4.649-0.002-8.817-1.829-11.888-4.827c-3.062-3.005-4.953-7.124-4.955-11.729
	c0.002-4.607,1.895-8.729,4.955-11.73c3.07-2.999,7.238-4.825,11.888-4.828c4.647,0.003,8.815,1.829,11.887,4.828
	C147.642,429.684,149.534,433.804,149.535,438.411z M150.631,367.077c-4.858,6.512-9.63,14.114-13.354,22.103
	c-0.486,1.044-1.276,2.187-1.276,3.246v-39.423h26.121C158.771,357.003,154.714,361.61,150.631,367.077z M211.861,229.208
	c-4.714,21.746-9.464,43.521-13.104,60.402c-1.819,8.441-3.359,15.537-4.482,20.797c-0.562,2.633-1.019,4.742-1.354,6.338
	c-0.166,0.798-0.305,1.436-0.408,1.951c-0.104,0.519-0.176,0.859-0.227,1.138c-0.165,0.921-0.503,1.778-0.952,2.578
	c-0.668,1.198-1.599,2.021-2.349,2.714c-0.038,0.035-0.068-0.123-0.104-0.123c-0.958,0-2.276,0-3.911,0c-2.257,0-5.12,0-8.438,0
	l33.368-175h19.229C226.153,163.003,219.047,196.065,211.861,229.208z"/>
<rect x="127.001" y="300.1" fill="#010101" width="9" height="25" opacity="0.5"/>
<path id="flame-d" display="none" fill="#F8EF6F" d="M130.206,296.373c-8.248,0-14.514-9.787-14.937-21.82
	c-1.139-32.402,12.577-51.308,13.633-51.806c0,25.374,16.24,32.651,16.24,51.806C145.142,286.605,138.456,296.373,130.206,296.373z"
	/>
<path id="flame-c" display="none" fill="#F8EF6F" d="M131.039,295.528c-9.761,0-17.175-5.988-17.677-13.352
	c-1.346-19.826,14.885-31.395,16.135-31.699c0,15.525,19.219,19.979,19.219,31.699C148.716,289.552,140.802,295.528,131.039,295.528
	z"/>
<path id="flame-b" display="none" fill="#F8EF6F" d="M112.456,275.63c0-16.766,19.219-23.137,19.219-45.345
	c1.25,0.436,17.48,16.983,16.135,45.345c-0.502,10.533-7.916,19.1-17.677,19.1C120.37,294.729,112.456,286.18,112.456,275.63z"/>
<path id="flame" fill="#F8EF6F" d="M115.202,279.787c0-13.601,16.24-18.769,16.24-36.784c1.056,0.354,14.771,13.777,13.633,36.784
	c-0.423,8.544-6.688,15.493-14.937,15.493C121.889,295.28,115.202,288.345,115.202,279.787z"/>
</svg>

  </div>
</body>
              
            
!

CSS

              
                body {
  background: #0071BC;
}

.bg-texture {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  z-index: 2;
  background-image: url('https://s3-us-west-2.amazonaws.com/ansley-codepen/night-texture.png');
}

.lantern-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

#flame {
  -webkit-box-shadow: -1px -24px 5px 0px rgba(50, 50, 50, 0.75);
  -moz-box-shadow: -1px -24px 5px 0px rgba(50, 50, 50, 0.75);
  box-shadow: -1px -24px 5px 0px rgba(50, 50, 50, 0.75);
}

.blur {
  z-index: -1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  opacity: .75;
  background-image: -o-radial-gradient(circle, rgba(248, 239, 111, .4), #0071BC 250px);
  background-image: -moz-radial-gradient(circle, rgba(248, 239, 111, .4), #0071BC 250px);
  background-image: -webkit-radial-gradient(circle, rgba(248, 239, 111, .4), #0071BC 250px);
  background-repeat: no-repeat;
}
              
            
!

JS

              
                function getRandomInt(min, max) {
  return Math.floor(Math.random() * (max - min + 1)) + min;
};

var flames = ['#flame', '#flame-b', '#flame-c', '#flame-d'];

function flameMorph() {
  var flameAnim = new TimelineMax()
    .to("#flame", 0.8, {
      morphSVG: {
        shape: flames[getRandomInt(0, 3)]
      },
      ease: Power1.easeInOut
    }, "-=0.2");
}

TweenMax.to('.blur', 0.3, {
  autoAlpha: '0.95',
  ease: Power1.easeInOut,
  repeat: -1
});

flameMorph();

setInterval(function() {
  flameMorph();
}, 300);
              
            
!
999px

Console