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.

              <div id="m0">G</div>
<div id="m1">R</div>
<div id="m2">O</div>
<div id="m3">U</div>
<div id="m4">P</div>
<div id="m4">A</div>
  <div id="t0">G</div>
  <div id="t1">R</div>
  <div id="t2">O</div>
  <div id="t3">U</div>
  <div id="t4">P</div>
  <div id="t5">B</div>
              body {
  background: #3d6644;
  text-align: center;
[id^=m], [id^=t] {
  margin-top: 1rem;
  font-size: 2rem;
  color: #f9f7fb;
  display: inline-block;
              var ms = Array.prototype.slice.call(document.querySelectorAll('[id^=m]'));
var ts = Array.prototype.slice.call(document.querySelectorAll('[id^=t]'));
var keyframeEffects = [];
var keyframeEffects2 = [];

var effects = {
  scalers: [
    { transform: 'scale(1)', offset: 0 },
    { transform: 'scale(.5)', offset: .7 },
    { transform: 'scale(1)', offset: 1 }
  translations: [
    { transform: 'translateY(0)', offset: 0 },
    { transform: 'translateY(.5rem)', offset: .7 },
    { transform: 'translateY(0)', offset: 1 }
var timing = {
  duration: 1000,
  easing: 'ease-in',
  fill: 'both',
  iterations: Infinity

//Create a KeyframeEffect for each element (this will not kick off any animation)
ms.forEach(function(el, i, ra) {
  var effect = new KeyframeEffect(el, effects.scalers, timing);
ts.forEach(function(el, i, ra) {
  effect = new KeyframeEffect(el, effects.translations, timing);

//add the six KeyframeEffects to a GroupEffect, and play it on the doucment timeline
var groupEffectA = new GroupEffect(keyframeEffects);
var anim = document.timeline.play(groupEffectA);

var groupEffectB = new GroupEffect(keyframeEffects2);
var anim2 = document.timeline.play(groupEffectB);

Loading ..................