Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

  <span data-duration="1.1" data-delay=".23" data-blur="6">“Two&nbsp;</span>
  <span data-duration="1.4" data-delay=".43" data-blur="3">things&nbsp;</span>
  <span data-duration="1.8" data-delay=".42" data-blur="5">are&nbsp;</span>
  <span data-duration="1.2" data-delay=".25" data-blur="9">infinite:&nbsp;</span>
  <span data-duration="1.7" data-delay=".30" data-blur="4">the&nbsp;</span>
  <span data-duration="1.2" data-delay=".29" data-blur="3">universe&nbsp;</span>
  <span data-duration="1.4" data-delay=".26" data-blur="5">and&nbsp;</span>
  <span data-duration="1.7" data-delay=".19" data-blur="9">human&nbsp;</span>
  <span data-duration="1.2" data-delay=".11" data-blur="5">stupidity;&nbsp;</span>
  <span data-duration="1.9" data-delay=".19" data-blur="2" >and&nbsp;</span>
  <span data-duration="1.2" data-delay=".36" data-blur="9" >I'm&nbsp;</span>
  <span data-duration="1.8" data-delay=".17" data-blur="3" >not&nbsp;</span>
  <span data-duration="1.2" data-delay=".30" data-blur="10" >sure&nbsp;</span>
  <span data-duration="1.5" data-delay=".50" data-blur="4" >about&nbsp;</span>
  <span data-duration="1.8" data-delay=".19" data-blur="2" >the&nbsp;</span>
  <span data-duration="1.3" data-delay=".18" data-blur="4" >universe.”&nbsp;</span>
 <cite>Albert Einstein</cite>
  margin: 0
  box-sizing: border-box
  height: 100%

  background-color: black
  display: flex
  flex-direction: row
  justify-content: center
  align-items: center
  padding: 1rem

  display: block
  margin: 0 auto
  text-align: center
  max-width: 900px
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: Georgia
  color: white
  font-size: 2.7rem
  font-style: italic
  font-weight: 300  
  padding-bottom: 2rem
  will-change: opacity
  opacity: 0
    opacity: 1
    -webkit-filter: blur(0) !important
  font-family: verdana
  font-size: .9rem
  color: #aaa
  opacity: 0
  font-style: normal
  font-weight: 500
    opacity: 1
const words = document.getElementsByTagName('span')
const cite = document.getElementsByTagName('cite')

const animate = () => {
  let maxDelay = 0
  let maxDuration = 0

  for (let i = 0; i < words.length; i++) {
    const word = words[i]
    const duration = (word.dataset.duration)
    const delay = (word.dataset.delay)
    const blur = word.dataset.blur

    maxDelay = Math.max(delay, maxDelay)
    maxDuration = Math.max(duration, maxDuration)
    TweenLite.set(word, {
      'webkitFilter': `blur(${blur}px)`
    TweenLite.set(word, {
      transition: `all ${duration}s ease-in ${delay}s`
  TweenLite.set(cite, {
    transition: `all ${maxDuration}s ease-in ${maxDelay}s`
  TweenLite.delayedCall((maxDuration + maxDelay), () => {
    const baseDelay = 3
    TweenLite.set(words, { className:"-=animate", delay: baseDelay });
    TweenLite.set(cite, { className:"-=animate", delay: (baseDelay) });
    TweenLite.delayedCall((baseDelay + (maxDuration*2)), animate)

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.