Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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

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.

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

              
                <h1>Click to Explode</h1>
<div class="periodic-table" data-script="PeriodicTable" data-animation="true" data-delay="1500">
  <div class="table-row">
    <div class="element red large">
      <div class="title">Strategy</div>
      <div class="abbrev">S</div>
    </div>
    <div class="element blank very-small"></div>
    <div class="element blue large">
      <div class="title">Design</div>
      <div class="abbrev">D</div>
    </div>
    <div class="element blue small">
      <div class="title">Elements</div>
      <div class="abbrev">De</div>
      <div class="subscript">D</div>
    </div>
    <div class="element blue small">
      <div class="title">Type</div>
      <div class="abbrev">Ty</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Color</div>
      <div class="abbrev">Co</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Shape</div>
      <div class="abbrev">Sh</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Texture</div>
      <div class="abbrev">Tx</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Pattern</div>
      <div class="abbrev">Pt</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Space</div>
      <div class="abbrev">Sp</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Sound</div>
      <div class="abbrev">So</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Depth</div>
      <div class="abbrev">De</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blank small"></div>
  </div>
  <div class="table-row">
    <div class="element red small">
      <div class="title">Discovery</div>
      <div class="abbrev">Di</div>
      <div class="subscript">S</div>
    </div>
    <div class="element red small">
      <div class="title">Attributes</div>
      <div class="abbrev">At</div>
      <div class="subscript">S</div>
    </div>
    <div class="element blank large">
    </div>
    <div class="element blank small">
    </div>
    <div class="element blue small">
      <div class="title">Logo</div>
      <div class="abbrev">Lg</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Photograph</div>
      <div class="abbrev">Ph</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Illustration</div>
      <div class="abbrev">Iu</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Layout</div>
      <div class="abbrev">La</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Grid</div>
      <div class="abbrev">Gr</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Style</div>
      <div class="abbrev">St</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Movement</div>
      <div class="abbrev">Mo</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blue small">
      <div class="title">Materials</div>
      <div class="abbrev">Ma</div>
      <div class="subscript">De</div>
    </div>
    <div class="element blank small">
    </div>
  </div>
  <div class="table-row">
    <div class="element red small">
      <div class="title">Brand Position</div>
      <div class="abbrev">Bp</div>
      <div class="subscript">S</div>
    </div>
    <div class="element red small">
      <div class="title">Vision</div>
      <div class="abbrev">Vi</div>
      <div class="subscript">S</div>
    </div>
    <div class="element blank large"></div>
    <div class="element blue small">
      <div class="title">Process</div>
      <div class="abbrev">Dp</div>
      <div class="subscript">D</div>
    </div>
    <div class="element blue small">
      <div class="title">Ideation</div>
      <div class="abbrev">Id</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Platform</div>
      <div class="abbrev">Pl</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Immersion</div>
      <div class="abbrev">Im</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Mind Map</div>
      <div class="abbrev">Mp</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Story</div>
      <div class="abbrev">Sy</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Sketch</div>
      <div class="abbrev">Sk</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Refine</div>
      <div class="abbrev">Rf</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Training</div>
      <div class="abbrev">Tr</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Critique</div>
      <div class="abbrev">Cr</div>
      <div class="subscript">Dp</div>
    </div>
  </div>
  <div class="table-row">
    <div class="element red small">
      <div class="title">Mission</div>
      <div class="abbrev">Mi</div>
      <div class="subscript">S</div>
    </div>
    <div class="element red small">
      <div class="title">Values</div>
      <div class="abbrev">Va</div>
      <div class="subscript">S</div>
    </div>
    <div class="element blank large">
    </div>
    <div class="element blank small">
    </div>
    <div class="element blue small">
      <div class="title">Standards</div>
      <div class="abbrev">St</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Audit</div>
      <div class="abbrev">Au</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Mood</div>
      <div class="abbrev">Mb</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Templates</div>
      <div class="abbrev">Tm</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Identity Manager</div>
      <div class="abbrev">Im</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Planning</div>
      <div class="abbrev">Pn</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Workshops</div>
      <div class="abbrev">Wo</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Research</div>
      <div class="abbrev">Re</div>
      <div class="subscript">Dp</div>
    </div>
    <div class="element blue small">
      <div class="title">Brainstorm</div>
      <div class="abbrev">Br</div>
      <div class="subscript">Dp</div>
    </div>
  </div>
  <div class="table-row negative-margin">
    <div class="element red small">
      <div class="title">Research</div>
      <div class="abbrev">Re</div>
      <div class="subscript">S</div>
    </div>
    <div class="element red small">
      <div class="title">Critique</div>
      <div class="abbrev">Cr</div>
      <div class="subscript">S</div>
    </div>
    <div class="element blank small">
    </div>
    <div class="element purple large">
      <div class="title">Client</div>
      <div class="abbrev">C</div>
      <div class="subscript"></div>
    </div>
    <div class="element purple small">
      <div class="title">Culture</div>
      <div class="abbrev">Cu</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">Competition</div>
      <div class="abbrev">Cm</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">History</div>
      <div class="abbrev">Hi</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">Location</div>
      <div class="abbrev">Lo</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">Goals</div>
      <div class="abbrev">Go</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">Values</div>
      <div class="abbrev">Va</div>
      <div class="subscript">C</div>
    </div>
    <div class="element blank small">
    </div>
    <div class="element blank small">
    </div>
    <div class="element blank small">
    </div>
  </div>
  <div class="table-row negative-margin">
    <div class="element red small">
      <div class="title">Brand Ambassador</div>
      <div class="abbrev">Ba</div>
      <div class="subscript">S</div>
    </div>
    <div class="element red small">
      <div class="title">Naming</div>
      <div class="abbrev">Na</div>
      <div class="subscript">S</div>
    </div>
    <div class="element blank large">
    </div>
    <div class="element blank small">
    </div>
    <div class="element purple small">
      <div class="title">Industry</div>
      <div class="abbrev">In</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">Process</div>
      <div class="abbrev">Pr</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">Budget</div>
      <div class="abbrev">Bu</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">Schedule</div>
      <div class="abbrev">Sc</div>
      <div class="subscript">C</div>
    </div>
    <div class="element purple small">
      <div class="title">Presentation</div>
      <div class="abbrev">Pn</div>
      <div class="subscript">C</div>
    </div>
    <div class="element blank small">
    </div>
    <div class="element blank small">
    </div>
    <div class="element blank small">
    </div>
    <div class="element blank small">
    </div>
  </div>
  <div class="table-row double-negative-margin">
    <div class="element red small">
      <div class="title">Audit</div>
      <div class="abbrev">Au</div>
      <div class="subscript">S</div>
    </div>
    <div class="element blank small">
    </div>
    <div class="element blank small">
    </div>
    <div class="element orange large">
      <div class="title">People</div>
      <div class="abbrev">P</div>
      <div class="subscript"></div>
    </div>
    <div class="element orange small">
      <div class="title">Passion</div>
      <div class="abbrev">Pa</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Background</div>
      <div class="abbrev">Ba</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Expertise</div>
      <div class="abbrev">Ex</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Gender</div>
      <div class="abbrev">Ge</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Interests</div>
      <div class="abbrev">Ir</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Style</div>
      <div class="abbrev">St</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">International</div>
      <div class="abbrev">It</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Age</div>
      <div class="abbrev">Ag</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Enthusiasm</div>
      <div class="abbrev">Et</div>
      <div class="subscript">P</div>
    </div>
  </div>
  <div class="table-row double-negative-margin">
    <div class="element blank small">
    </div>
    <div class="element blank small">
    </div>
    <div class="element blank large">
    </div>
    <div class="element blank small">
    </div>
    <div class="element orange small">
      <div class="title">Education</div>
      <div class="abbrev">Ed</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Humur</div>
      <div class="abbrev">Hu</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Personality</div>
      <div class="abbrev">Pe</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Aspiration</div>
      <div class="abbrev">As</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Character</div>
      <div class="abbrev">Ch</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Vision</div>
      <div class="abbrev">Vi</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Imagination</div>
      <div class="abbrev">Ig</div>
      <div class="subscript">P</div>
    </div>
    <div class="element orange small">
      <div class="title">Energy</div>
      <div class="abbrev">En</div>
      <div class="subscript">P</div>
    </div>
    <div class="element blank small">
    </div>
  </div>
</div>
              
            
!

CSS

              
                h1 {
  font-family: 'helvetica neue', 'helvetica', arial, sans-serif;
  font-size: 1em;
  color: #999;
}
.periodic-table {
  *zoom: 1;
}
.periodic-table .table-row {
  position: relative;
  *zoom: 1;
}
.periodic-table .table-row:before, .periodic-table .table-row:after {
  content: " ";
  display: table;
}
.periodic-table .table-row:after {
  clear: both;
}
.periodic-table .table-row.negative-margin {
  top: -17px;
}
.periodic-table .table-row.double-negative-margin {
  top: -35px;
}
.periodic-table .table-row.triple-negative-margin {
  top: -42px;
}
.periodic-table .element {
  display: inline-block;
  position: relative;
  color: white;
  font-family: "TradeGothicLTPro-Bd2", "helvetica neue", arial, sans-serif;
  padding: 5px;
  font-size: 14px;
  top: auto;
  left: auto;
}
.periodic-table .element .title, .periodic-table .element .abbrev, .periodic-table .element .subscript {
  position: absolute;
}
.periodic-table .element .title {
  left: 0;
  right: 0;
  top: 3px;
  text-align: center;
  font-size: .8em;
}
.periodic-table .element .abbrev {
  top: 50%;
  margin-top: -15%;
  right: 0;
  left: 0;
  text-align: center;
  font-size: 2.25em;
}
.periodic-table .element .subscript {
  bottom: 5px;
  left: 5px;
}
.periodic-table .element .description {
  position: relative;
  padding: 20px;
  opacity: 0;
}
.periodic-table .element .description h1 {
  color: #fff;
  font-size: 47px;
  margin-bottom: 10px;
}
.periodic-table .element .description .btn-close {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 25px;
  width: 25px;
}
.periodic-table .element:hover {
  cursor: pointer;
  /*@include scale(1.1);
  z-index: $z-layer-index-4;
  @include box-shadow(0px 0px 10px rgba(50, 50, 50, 0.75))*/
}
.periodic-table .set-position {
  left: auto !important;
  top: auto !important;
  opacity: 1 !important;
  -webkit-transition: top 1s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 1s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 3s;
  -moz-transition: top 1s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 1s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 3s;
  -o-transition: top 1s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 1s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 3s;
  transition: top 1s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 1s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 3s;
}
.periodic-table .set-position.blue {
  -webkit-transition: top 2s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 2s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 4s;
  -moz-transition: top 2s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 2s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 4s;
  -o-transition: top 2s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 2s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 4s;
  transition: top 2s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 2s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 4s;
}
.periodic-table .set-position.red {
  -webkit-transition: top 3s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 3s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 5s;
  -moz-transition: top 3s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 3s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 5s;
  -o-transition: top 3s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 3s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 5s;
  transition: top 3s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 3s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 5s;
}
.periodic-table .set-position.orange {
  -webkit-transition: top 4s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 4s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 6s;
  -moz-transition: top 4s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 4s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 6s;
  -o-transition: top 4s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 4s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 6s;
  transition: top 4s cubic-bezier(0.15, 0.42, 0.35, 1.01), left 4s cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 6s;
}
.periodic-table .set-position.large {
  -webkit-transition: top 4500ms cubic-bezier(0.15, 0.42, 0.35, 1.01), left 4500ms cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 6s;
  -moz-transition: top 4500ms cubic-bezier(0.15, 0.42, 0.35, 1.01), left 4500ms cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 6s;
  -o-transition: top 4500ms cubic-bezier(0.15, 0.42, 0.35, 1.01), left 4500ms cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 6s;
  transition: top 4500ms cubic-bezier(0.15, 0.42, 0.35, 1.01), left 4500ms cubic-bezier(0.15, 0.42, 0.35, 1.01), background-color 100ms, opacity 6s;
}
.periodic-table .very-large {
  width: 150px;
  height: 150px;
  margin: 10px 10px 10px 0px;
  -webkit-transition: all 500ms linear;
  -webkit-transition-delay: 500ms;
  -moz-transition: all 500ms linear 500ms;
  -o-transition: all 500ms linear 500ms;
  transition: all 500ms linear 500ms;
}
.periodic-table .very-large .title {
  font-size: 16px;
  top: 15px;
}
.periodic-table .very-large .abbrev {
  font-size: 54px;
}
.periodic-table .very-large .subscript {
  font-size: 21px;
}
.periodic-table .very-large:first-child {
  margin-left: 0;
}
.periodic-table .very-large.selected {
  height: 300px;
  width: 500px;
  -webkit-transition: all 250ms linear;
  -webkit-transition-delay: 0ms;
  -moz-transition: all 250ms linear 0ms;
  -o-transition: all 250ms linear 0ms;
  transition: all 250ms linear 0ms;
}
.periodic-table .very-large.selected .description {
  opacity: 1;
  -webkit-transition: opacity 500ms linear;
  -webkit-transition-delay: 1000ms;
  -moz-transition: opacity 500ms linear 1000ms;
  -o-transition: opacity 500ms linear 1000ms;
  transition: opacity 500ms linear 1000ms;
}
.periodic-table .very-large.selected .title, .periodic-table .very-large.selected .abbrev, .periodic-table .very-large.selected .subscript {
  opacity: 0;
  -webkit-transition: opacity 50ms linear;
  -webkit-transition-delay: 0ms;
  -moz-transition: opacity 50ms linear 0ms;
  -o-transition: opacity 50ms linear 0ms;
  transition: opacity 50ms linear 0ms;
}
.periodic-table .large {
  width: 62px;
  height: 62px;
}
.periodic-table .small .title {
  font-size: .5em;
  padding-right: 2px;
  padding-left: 2px;
}
.periodic-table .small .abbrev {
  font-size: 1.3em;
}
.periodic-table .small .subscript {
  font-size: 0.6em;
  bottom: 1px;
  left: 3px;
}
.periodic-table .very-small {
  width: 26px;
  height: 40px;
}
.periodic-table .small {
  width: 44px;
  height: 44px;
}
.periodic-table .blank {
  height: 10px;
}
.periodic-table .blue {
  background-color: #4f90cd;
}
.periodic-table .blue:hover {
  background-color: #3477b5;
}
.periodic-table .red {
  background-color: #ee334f;
}
.periodic-table .purple {
  background-color: #772165;
}
.periodic-table .orange {
  background-color: #f36f21;
}
.periodic-table:before, .periodic-table:after {
  content: " ";
  display: table;
}
.periodic-table:after {
  clear: both;
}
              
            
!

JS

              
                $me = $('.periodic-table')
_animationDelay = 1500

_reForm = () ->
  $me.find('.element').each(() ->
    $(this).addClass('set-position')
  )
  
_explode = () ->
  $me.find('.element').css({
    'left': 'auto',
    'top': 'auto'
  }).removeClass('set-position')
  $me.find('.element').each(() ->
    tempTop = parseInt( Math.random()*15 )
    tempLeft = parseInt( Math.random()*15 )
    plusOrMinus = Math.round(Math.random()) * 2 - 1
    randomTop = 50 * tempTop * plusOrMinus
    randomLeft = 50 * tempLeft * plusOrMinus
    $(this).css({
      'top': randomTop + "px",
      'left': randomLeft + "px",
      'opacity': '0.1'
    })
  )
  setInterval(_reForm,_animationDelay)
      
_docReady = () ->
  $me.click(_explode)

$(document).ready(_docReady)
              
            
!
999px

Console