css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

              <h1 id="opener">
              @font-face {
    font-family: Orphan;
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/orphan_2.woff') format('woff');
    font-weight: normal;
    font-weight: 100;
    font-style: normal;
@keyframes scroller {
    80% { text-indent: 5%; }
    100% { text-indent: 5%; }

@keyframes fader {
  to { opacity: 0; }
* { box-sizing: border-box; } 
html { 
  font-family: Orphan, Futura Light, Futura, sans-serif;
  font-size: 4.8vw;
  /* so that the text scales to browser window */
  min-height: 100%;
body { 
  margin: 0; height: 100%;
  display: flex;
  align-content: center;
  justify-content: center; 
  /* basic centering of content with flexbox */
h1 { 
  width: 95%;
  overflow: hidden;
  text-transform: uppercase;
  /* just in case someone forgets to turn on CAPS */
h1 span { 
  display: inline-block;
  width: 50%;
  overflow: hidden;
  line-height: 2;
  animation: scroller 4s 1.5s 2 forwards, fader 1s 5s; 
/* initiates the "scroller" animation twice, each time for four seconds, with a 1 second pause beforehand. The "fader" animation takes place just once, over 1 second, with a five second pause beforehand */
h1 span:first-child { 
  text-indent: 100%; 
  /* disappers text in the first (overflow: hidden) span by pushing it all the way to the right. Curiously, Webkit works with a value of 50%, but Firefox needs 100%; */
  border-right: .5vw solid #000; 
h1 span:last-child { 
  text-indent: -100%;  
  /* the opposite indent value for text in the right <span> element */
  border-left: .5vw solid #000;
h1 span.closer:first-child { 
  width: 20%; 
/* shifted due to character length in the second part of the animation: this could also be automated by JavaScript counting the number of chars in each span and dividing the space appropriately */
h1 span.closer:last-child { width: 80%;  }
              var first = document.querySelector("h1 span:first-child");
var last = document.querySelector("h1 span:last-child");

function closer() {
first.innerHTML = "@"
timeoutID = window.setTimeout(closer, 6000);
// bring on the Web Animations API: this is a very hacky way of saying "when the first scroller animation ends, switch out the content of the span elements and add classes to them. "
🕑 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.
Loading ..................