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

              
                
<div id="content">
  <div id="titles">
    <h1 id= "firstLine" class="animated fadeInDown">Your World.</h1>
    <h1 id="secondLine">Redefined.</h1>
  </div>

  <div id="ready" class="animated">
    <h1 id="readyText" class="animated">Are you Ready?</h1>
  </div>

  <hr>

  <div id="entryBox">
    <input id="mainInput" type="text" placeholder=" Name">
    <button>Begin</button>
  </div>

  <div id="lineDrawing">
      <svg id="rocketShip" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" width="250px" height="250px" viewBox="0 0 512 512" xmlns:xlink="http://www.w3.org/1999/xlink">
        <g>
          <g fill="none" stroke="white" stroke-width="3" class="lines">
            <path d="m350.3,255.1c7.9-87.6-22.7-176.9-86.9-241.1-3.9-3.9-10.8-3.9-14.7,0-64.2,64.2-94.8,153.4-86.9,241.1-22.2,23.9-34.4,54.7-34.4,87.5 0,33.1 12.6,64.6 35.5,88.6 5.6,5.9 19.9,3.2 17.6-9.8-1.2-6.8-2.7-13.4-2.7-19.9 0-16.2 4.9-31.6 14-44.6 1.5,0.8 3.2,1.3 5,1.3h118.5c1.8,0 3.5-0.5 5-1.3 9.1,13 14,28.4 14,44.6 0,6.5-1.7,13-2.7,19.9-2.1,14.4 12.9,14.9 17.6,9.8 22.8-24.1 35.5-55.5 35.5-88.6-0.1-32.8-12.2-63.7-34.4-87.5zm-94.3-218.7c18.6,20 33.8,42.5 45.6,66.4h-91.1c11.7-24 26.9-46.4 45.5-66.4zm-98,351c-6.4-13.9-9.7-29.1-9.7-44.8 0-21.2 6.1-41.5 17.5-58.9 0.1,0.8 11,42.5 15.2,53.2-12.5,14.4-20.4,31.8-23,50.5zm150.4-50.1h-104.8c-29.4-69-29.1-146.1-2.4-213.8h109.6c26.7,67.7 27,144.8-2.4,213.8zm22.7-.4c5.8-14.9 15.1-52.6 15.2-53.2 11.4,17.3 17.5,37.6 17.5,58.9 0,15.7-3.4,30.9-9.7,44.8-2.7-18.7-10.6-36.1-23-50.5z"/>
            <path d="m213.9,375.6c-5.8,0-10.4,4.7-10.4,10.4v52.3c0,5.8 4.7,10.4 10.4,10.4s10.4-4.7 10.4-10.4v-52.3c0-5.8-4.7-10.4-10.4-10.4z"/>
            <path d="m256,375.6c-2.9,0-5.5,1.2-7.4,3.1 0,0 0,0-0.1,0.1-1.2,1.2-2.1,2.8-2.6,4.6-0.2,0.9-0.4,1.8-0.4,2.8v104.5c0,0.8 0.1,1.6 0.3,2.4 1.1,4.6 5.2,8 10.1,8s9-3.4 10.1-8c0.2-0.8 0.3-1.6 0.3-2.4v-104.7c0-1-0.1-1.9-0.4-2.8-1.1-4.4-5.1-7.6-9.9-7.6z"/>
            <path d="m298.1,375.6c-5.8,0-10.4,4.7-10.4,10.4v52.3c0,5.8 4.7,10.4 10.4,10.4s10.4-4.7 10.4-10.4v-52.3c0.1-5.8-4.6-10.4-10.4-10.4z"/>
          </g>
        </g>
      </svg>
    </div>
</div>

  <nav id="navBottom" class="navbar fixed-bottom navbar-expand-lg navbar-dark">
    <a class="navbar-brand" href="#">&copy; Stephen S.</a>
    <a class="navbar-brand ml-auto" href="https://codepen.io/sparlos/" target="_blank">View Codepen Profile</a>
  </nav>

              
            
!

CSS

              
                body, html {
  width: 100%;
  height: 100%;
}

body {
  background-image: url('https://images.unsplash.com/photo-1488866022504-f2584929ca5f?auto=format&fit=crop&w=1486&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D');
  background-size: cover;
  margin: 0;
  background-repeat: no-repeat;
  background-position: 0 0;
  transition: 2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#titles {
  margin: 0 auto;
}

h1 {
  color: #ffffff;
  letter-spacing: 1.4px;
  text-align: center;
}

#firstLine {
  margin-top: 120px;
}

#secondLine {
  visibility: hidden;
}

.movedBackground {
  background-position: 0 40%;
}

#entryBox {
  visibility: hidden;
  margin: 5% auto;
  display: inline-block;
  width: 30%;
  margin-left: 35.5%;
}

input {
  letter-spacing: 0.5px;
  width: 80%;
  background-color: rgba(163, 163, 163, 0);
  border: 1px solid rgba(255, 255, 255, 1);
  color: #f7f7f7;
  padding: 10px 10px;
  border-radius: 10px;
  transition: 0.5s;
}

input::placeholder {
  color: rgba(242, 242, 242, 0.8);
}

button {
  float: right;
  letter-spacing: 0.5px;
  width: 20%;
  background-color: rgba(119, 119, 119, 0);
  color: rgba(242, 242, 242, 0.8);
  border: 1px solid rgba(255, 255, 255, 1);
  padding: 10px 10px;
  border-radius: 10px;
  transition: 0.5s;
}

button:hover {
  color: #f2f2f2;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0);
}

button:focus {
    outline: none; 
}

input:focus {
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0);
}

hr {
    visibility: hidden;
    margin: 0 auto;
    margin-top: 40px;
    width: 20%;
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
}

#ready {
  position: relative;
  margin: 0 auto;
  margin-top: -80px;
  z-index: -10;
  visibility: hidden;
}

#readyText {
    transition: 1s;
}

#navBottom {
  visibility: hidden;
}

.navbar-brand {
  font-weight: lighter;
}

#rocketShip {
  fill: white;
  visibility: hidden;
}

#lineDrawing {
  width: 250px;
  margin: 0 auto;
}

#afterAnimationHeader {
  margin-top: 400px;
}
              
            
!

JS

              
                var firstPass = true;

 $("#firstLine").on("animationend", function() {
   if (firstPass) {
    $("#secondLine").addClass("animated fadeInUp");
    $("#secondLine").css("visibility", "visible");
    $("hr").css("visibility", "visible");
    $("hr").addClass("animated fadeInLeft");
    firstPass = false; 
   }
});  

$("#secondLine").on("animationend", function() {
  $("body").addClass("movedBackground");
});

$("body").on("transitionend", function(){
  $("#entryBox").css("visibility", "visible");
  $("#entryBox").addClass("animated fadeIn");
  $("#navBottom").css("visibility", "visible");
  $("#navBottom").addClass("animated fadeIn");
});

$("input").on("focusin", function(){
  $("#firstLine").addClass("fadeOutRight");
  $("#secondLine").addClass("fadeOutLeft");
  $("#ready").css("visibility", "visible");
  $("#ready").addClass("fadeIn");
  $("#ready").removeClass("fadeOut");
  $("#rocketShip").css("visibility", "visible");
  var lineDrawing = anime({
    targets: '#lineDrawing .lines path',
    strokeDashoffset: [anime.setDashoffset, 0],
    easing: 'easeInOutSine',
    duration: 1500,
    delay: function(el, i) { return i * 250 },
    direction: 'normal'
  });
});

$("input").on("focusout", function(){
  $("#firstLine").addClass("fadeInRight");
  $("#firstLine").removeClass("fadeOutRight fadeInDown");
  $("#secondLine").addClass("fadeInLeft");
  $("#secondLine").removeClass("fadeOutLeft fadeInUp");
  $("#ready").removeClass("fadeIn");
  $("#ready").addClass("fadeOut");
  var lineDrawing = anime({
    targets: '#lineDrawing .lines path',
    strokeDashoffset: [anime.setDashoffset, 0],
    easing: 'easeInOutSine',
    duration: 1500,
    delay: function(el, i) { return i * 250 },
    direction: 'reverse'
  });
});

$("button").on("click", function(){
    moveContent();
});

var name = "";

function moveContent(){
  name = getName();
  $("#content").animate({
    marginTop: '-800px'
  }, 1500, function(){
    $("#content").html(" ");
    $("#content").css("margin-top", "0");
    $("#content").html("<h1 id='afterAnimationHeader' class='animated fadeIn'>" + name + ", this is your story.</h1>");
  });
}

function getName(){
 return $("#mainInput").val();
}

$("#mainInput").on('keyup', function (e) {
    if (e.keyCode == 13) {
        moveContent();
    }
});
              
            
!
999px

Console