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

              
                <!--
Based on After Effects template by Amaksi
http://videohive.net/item/lower-thirds/10338608
-->
<main>
   <div id="animation-1" class="animation">
    <div class="red">/</div>
    <div class="white light mask">
      <div>Frederic</div>
    </div>
    <div class="white light mask">
      <div>Colins</div>
    </div>
  </div>
  
  <div id="animation-2" class="animation">
    <div class="red bold arimo mask">
      <div>John Doe</div>
    </div>
    <div class="white light mask">
      <div>Motion Designer</div>
    </div>
  </div>
  
  <div id="animation-3" class="animation">
    <div class="white light mask">
      <div>Sarah</div>
    </div><div class="red bold arimo mask">
      <div>Brown</div>
    </div>
  </div>
  
  <div id="animation-4" class="animation">
    <div class="white bold arimo mask">
      <div>John Doe</div>
    </div>
    <div class="mask"><div></div></div>
  </div>
  
  <div id="animation-5" class="animation">
    <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%">
      <defs>
        <clipPath id="mask-bottom-right">
          <rect class="clip-path" x="70%" y="0" width="30%" height="100%"/>
        </clipPath>
        <clipPath id="mask-top">
          <rect class="clip-path" x="0" y="0" width="100%" height="100%"/>
        </clipPath>
        <clipPath id="mask-bottom-left">
          <rect class="clip-path" x="0" y="0" width="30%" height="100%"/>
        </clipPath>
      </defs>
      
      <line class="bottom-right" x1="70%" y1="100%" x2="100%" y2="100%"/>
      <line class="right" x1="100%" y1="0" x2="100%" y2="100%"/>
      <line class="top" x1="0" y1="0" x2="100%" y2="0"/>
      <line class="left" x1="0" y1="0" x2="0" y2="100%"/>
      <line class="bottom-left" x1="0" y1="100%" x2="30%" y2="100%"/>
    </svg>
    <div class="white bold arimo mask">
      <div>Nathan Fillion</div>
    </div>
    <div class="white mask">
      <div>Director</div>
    </div>
  </div>
</main>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300);
@import url(https://fonts.googleapis.com/css?family=Arimo:400,700);

$red: #cf4c4e;
$ease-out: cubic-bezier(.19, .76, .32 ,1);

body {
  margin: 0;
}

main {
  font-family: Open Sans;
  text-transform: uppercase;
  line-height: 1;
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(25deg, #091521, #7a8699);
}

.animation {
  width: 20em;
  height: 4em;
  margin: 1em auto;
  position: relative;
}

.arimo {
  font-family: Arimo;
}

.red {
  color: $red;
}

.white {
  color: white;
}

.light {
  font-weight: 300;
}

.bold {
  font-weight: 700;
}

.mask {
  overflow: hidden;
  position: relative;
}


/*********************
* Animation 1
*********************/

@keyframes animation-1-slash {
  0% {
    opacity: 0;
    transform: translate3d(6em, 0, 0);
  }
  
  25% {
    opacity: 0;
    transform: translate3d(6em, 0, 0);
  }
  
  45% {
    opacity: 1;
  }
  
  50% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes animation-1-text-1 {
  0% {left: -100%;}  
  45% {left: -100%;}  
  65% {left: 0;}
}

@keyframes animation-1-text-2 {
  0% {left: -100%;}  
  55% {left: -100%;}  
  75% {left: 0;}
}

#animation-1 {
  
  div {
    position: absolute;
  }
  
  & > div:first-child {
    font-size: 4.8em;
    top: -.13em;
    animation: 4s $ease-out infinite alternate both animation-1-slash;
  }
  
  & > div:nth-child(2),
  & > div:nth-child(3) {
    font-size: 2em;
    height: 1em;
    width: 5em;
    
    div {
      animation: 4s $ease-out infinite alternate both;
    }
  }
  
  div:nth-child(2) {
    top: 0;
    left: .9em;
    
    div {
      animation-name: animation-1-text-1;
    }
  }
  
  div:nth-child(3) {
    top: .8em;
    left: .5em;
    
    div {
      animation-name: animation-1-text-2;
    }
  }
}


/*********************
* Animation 2
*********************/

@keyframes animation-2-name {
  0% {transform: translate3d(0, 100%, 0);}  
  30% {transform: translate3d(0, 100%, 0);}  
  60% {transform: translate3d(0, 0, 0);}
}

@keyframes animation-2-title {
  0% {transform: translate3d(0, -100%, 0);}  
  30% {transform: translate3d(0, -100%, 0);}  
  60% {transform: translate3d(0, 0, 0);}
}

#animation-2 {
  text-align: center;
  
  & > div {
    width: 100%;
    height: 1em;
    
    div {
      position: absolute;
      width: 100%;
    }
  }
  
  & > div:first-child {
    font-size: 2.8em;
    
    div {
      animation: 3s ease-out infinite alternate both animation-2-name;
    }
  }
  
  & > div:last-child {
    font-size: 1.1em;
    
    div {
      animation: 3s ease-out infinite alternate both animation-2-title;
    }
  }
}


/*********************
* Animation 3
*********************/

@keyframes animation-3-left {
  0% {transform: translate3d(100%, 0, 0);}  
  30% {transform: translate3d(100%, 0, 0);}  
  60% {transform: translate3d(0, 0, 0);}
}

@keyframes animation-3-right {
  0% {transform: translate3d(-100%, 0, 0);}  
  30% {transform: translate3d(-100%, 0, 0);}  
  60% {transform: translate3d(0, 0, 0);}
}

#animation-3 {
  
  & > div {
    display: inline-block;
    width: 50%;
    height: 1em;
  }
  
  & > div:first-child {
    font-size: 2.4em;
    text-align: right;
    letter-spacing: 1px;
    
    div {
      animation: 3.2s ease-out infinite alternate both animation-3-left;
    }
  }
  
  & > div:last-child {
    font-size: 2.5em;
    line-height: 1.15;
    letter-spacing: -1px;
    
    div {
      animation: 3.2s ease-out infinite alternate both animation-3-right;
    }
  }
}


/*********************
* Animation 4
*********************/

@keyframes animation-4-stroke {
  0% {transform: translate3d(0, -100%, 0);}  
  30% {transform: translate3d(0, -100%, 0);}  
  60% {transform: translate3d(0, 0, 0);}
}

@keyframes animation-4-text {
  0% {transform: translate3d(0, -100%, 0);}  
  50% {transform: translate3d(0, -100%, 0);}  
  80% {transform: translate3d(0, 0, 0);}
}

#animation-4 {
  
  & > div {
    display: inline-block;
    vertical-align: middle;
    
    div {
      animation: 3s ease-out infinite alternate both;
    }
  }
  
  & > div:first-child {
    font-size: 2.8em;
    
    div {
      animation-name: animation-4-text;
    }
  }
  
  & > div:last-child {
    
    div {
      width: .38em;
      height: 2.4em;
      background-color: $red;
      animation-name: animation-4-stroke;
    }
  }
}


/*********************
* Animation 5
*********************/

@keyframes animation-5-bottom-right {
  0% {transform: translate3d(-100%, 96%, 0);}
  8% {transform: translate3d(-100%, 96%, 0);}  
  30% {transform: translate3d(0, 96%, 0);}  
  38% {transform: translate3d(0, 0, 0);}
}

@keyframes animation-5-top {
  0% {transform: translate3d(100%, 0, 0);}  
  38% {transform: translate3d(100%, 0, 0);}  
  58% {transform: translate3d(0, 0, 0);}
}

@keyframes animation-5-bottom-left {
  0% {transform: translate3d(-98%, -100%, 0);}  
  58% {transform: translate3d(-98%, -100%, 0);}  
  64% {transform: translate3d(-98%, 0, 0);}  
  84% {transform: translate3d(0, 0, 0);}
}

@keyframes animation-5-text-name {
  0% {transform: translate3d(0, 100%, 0);}
  25% {transform: translate3d(0, 100%, 0);}
  45% {transform: translate3d(0, 0, 0);}
}

@keyframes animation-5-text-title {
  0% {transform: translate3d(0, -100%, 0);}
  35% {transform: translate3d(0, -100%, 0);}
  55% {transform: translate3d(0, 0, 0);}
}

#animation-5 {
  text-align: center;
  height: 3.5em;
  
  svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
  }
    
  line {
    stroke-width: 4px;
    stroke: $red;
  }
  
  div,
  .clip-path {
      animation: 3.1s ease-out infinite alternate both;
  }
  
  .bottom-right,
  .right {
    clip-path: url(#mask-bottom-right);
  }
  
  .top {
    clip-path: url(#mask-top);
  }
  
  .bottom-left,
  .left {
    clip-path: url(#mask-bottom-left);
  }
  
  #mask-bottom-right > .clip-path {
      animation-name: animation-5-bottom-right;
  }
  
  #mask-top > .clip-path {
      animation-name: animation-5-top;
  }
  
  #mask-bottom-left > .clip-path {
      animation-name: animation-5-bottom-left;
  }
  
  & > div:nth-child(2) {
    font-size: 2em;
    padding-top: .4em;
    
    div {
      animation-name: animation-5-text-name;
    }
  }
  
  & > div:nth-child(3) {
    font-size: .9em;
    letter-spacing: .7px;
    margin-top: .2em;
    
    div {
      animation-name: animation-5-text-title;
    }
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console