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 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.

Quick-add: + add another resource

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.

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.

            
              <script type="text/javascript" src="//use.typekit.net/pxo8qyc.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>

<div class="loading">
  <div class="container">
    <div class="title-card">
      <h1>Alice in Videoland</h1>
      <h2 class="byline">A retelling of Lewis Carroll's classic in pixels and HTML by <a href="http://rachelnabors.com">Rachel Nabors</a></h2>
    </div>
  </div>
</div>
            
          
!
            
              .container {
  padding-top: 75%;
  background: #a22882 url(http://rachelnabors.com/alice-in-videoland/book/img/pat_argyle.svg) repeat;
  background-size: 25% auto;
  overflow: hidden;
  position: relative;
}

.loaded .container {
  padding-top: 0;
  transition: padding-top 2s ease-in 4s;
}

.title-card {
  text-align: center;
}

h1 {
  background: #a22882;
  box-sizing: border-box;
  color: #431236;
  font-family: "hellenic-wide", serif;
  font-size: 36px;
  padding: 1em 1em .5em;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  z-index: 3;
}

.byline {
  background: #20b3aa;
  box-sizing: border-box;
  color: #00232b;
  font-size: 16px;
  position: absolute;
  bottom: 0;
  font-family: "nueva-std-extended",serif;
  font-weight: 400;
  padding: .5em;
  width: 100%;
  z-index: 3;
}

#loader {
  animation: cup-drop 1.5s cubic-bezier(.11,1.06,.21,.99) 1.5s forwards;
  background: url(http://rachelnabors.com/alice-in-videoland/book/img/teacup.svg) 0 0 no-repeat;
  background-size: 100% auto;
  width: 40%; padding-top:30%;
  position: absolute;
  top: -100%; left: 50%;
  margin-left: -15%;
  z-index: 2;
  transform: scale3d(1,1,1);
}

#loader p {
  font-family: "blue-goblet-alt",fantasy;
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  position: absolute;
  top: 40%; left: 8%;
  width: 60%;
}

.saucer {
  animation: saucer-drop 2s cubic-bezier(.11,1.06,.87,1.06) forwards;
  background: url(http://rachelnabors.com/alice-in-videoland/book/img/saucer.svg) 0 0 no-repeat;
  background-size: 100% auto;
  width: 50%; padding-top: 50%;
  position: absolute;
  top: -100%; left: 50%;
  margin-left: -25%;
  z-index: 1;
}

#brew {
  animation: pour-tea 5s 1 3s forwards;
  opacity: 1;
  position: absolute;
  bottom: 78%; left: 50%;
  margin-left: -31%;
  width: 40%;
  transform-origin: 50% 50% ;
}

@keyframes pour-tea {
  100% {
    opacity: 1;
    transform: scale(1.6, 1.75);
    bottom: 80%;
  }
}

@keyframes cup-drop {
  100% {
    top: 35%;
  }
}

@keyframes saucer-drop {
  100% {
    top: 65%;
  }
}

.loaded .saucer {
  animation: saucer-done 1s cubic-bezier(1,1.18,.46,-0.19) forwards;
  top: 65%;
}

.loaded #loader {
  animation: cup-done 1s cubic-bezier(1,1.18,.46,-0.19) 1.5s forwards;
  top: 35%;
}

@keyframes saucer-done {
  100% {
    top: 100%;
  }
}

@keyframes cup-done {
  100% {
    top: 100%;
  }
}
            
          
!
            
                $(".title-card").append('<div id="loader"><svg version="1.1" id="brew" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="266px" height="25px" viewBox="0 0 266 25" enable-background="new 0 0 266 25" xml:space="preserve"><ellipse fill="#903741" cx="133" cy="12.5" rx="133" ry="12.5"/></svg><p>Please wait while we load</p></div><div class="saucer"></div>');

$(window).load(function() {
  setTimeout(function(){ //gotta wait a lil' bit
    $(".loading").removeClass("loading").addClass("loaded");
  }, 6000); 
});
            
          
!
999px
Loading ..................

Console