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 class="container">
  <h1 class="animatable" id="title">Woodwoerk</h1>
  <div class="animatable" id="message"></div>
  <div class="animatable" id="sun"></div>

  <div class="form animatable">
    <div class="content signup--content">
      <div class="sign--type">
        <span>Already have an account?<br></span>
        <span class="link signin"><a href="#signin">Sign in</a></span>
      </div>

      <form id="signed-up" enctype="multipart/form-data">
        <div class="spacer"></div>
        <input type="email" name="email" id="email" class="text-box" required="required" placeholder="Enter your email" value="example@email.com">
        <input type="password" name="password" id="password" class="text-box" required="required" placeholder="Enter your password" value="password">
        <input type="password" name="password" id="password" class="text-box" required="required" placeholder="Confirm your password" value="password">
        <input type="submit" value="Sign up" class="submit">
      </form>
    </div>

    <div class="content signin--content">
      <div class="sign--type">
        <span>Don't have an account?<br></span>
        <span class="link signup"><a href="#signup">Sign Up</a></span>
      </div>

      <form id="signed-in" enctype="multipart/form-data">
        <div class="spacer"></div>
        <input type="email" name="email" id="email" class="text-box" required="required" placeholder="Email" value="example@email.com">
        <input type="password" name="password" id="password" class="text-box" required="required" placeholder="Password" value="password">
        <input type="submit" value="Sign in" class="submit">
      </form>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Cantarell|Josefin+Sans);

$font-head: 'Josefin Sans', sans-serif;
$font-copy: 'Cantarell', sans-serif;

//Colors
$body-bg: #17BEBB;
$primary: #26547C;
$bg: #F5F5F5;

* {
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: $font-copy;
  background-color: $body-bg;
  color: rgba(0,0,0,0.85);
  font-size: 16px;
  overflow: hidden;  
}

a {
  font-size: 90%;
  cursor: pointer;
  letter-spacing: 2px;
  text-decoration: none;
  border-bottom: 1px solid rgba(211,49,68,0.8);
  box-shadow: 0 0 0 $bg, 0 0 0 rgba(211,49,68,0.8);
  text-transform: uppercase;
  color: rgba(211,49,68,0.8);
  transition: all 0.2s;
}
a:hover {
  border-bottom: 2px solid rgba(211,49,68,0.7);
  box-shadow: 0 2px 0 $bg, 0 4px 0 rgba(211,49,68,0.7);
  color: rgba(211,49,68,1);
  transition: all 0.1s;
}


#title {
  font-size: 110%;
  margin-bottom: 23px;
  text-align: center;
  letter-spacing: 10px;
  text-indent: 10px;
  text-transform: uppercase;
  font-weight: normal;
  color: $bg;
  text-shadow: 0px 0px 0px rgba(255,255,255,0);
  z-index: -20;

  font-family: $font-head;
}
#title.signed-in{
  text-shadow: 0px 0px 40px rgba(255,255,255,1), 0 -5px 6px rgba(0,0,0,0.3);
  font-size: 180%;
  letter-spacing: 20px;
  transform: translateY(85px);
  transition: all 2.5s, text-shadow 4s 1s;
}
#title.signed-up{
  text-shadow: 0px 0px 40px rgba(255,255,255,1);
  font-size: 200%;
  letter-spacing: 20px;
  transform: translateY(160px);
  transition: all 1s, text-shadow 4s 1s;
}

#message {
  position: absolute;
  text-align: center;
  left: 40px; right: 40px;
  font-size: 115%;
  letter-spacing: 10px;
  color: $bg;
  opacity: 0;
  top: 40%;
  text-shadow: 0 0 0 rgba(0,0,0,0.4);
  z-index: -2;
}
#message.signed-in {
  opacity: 1;
  top: 290px;
  font-size: 120%;
  letter-spacing: 8px;
  text-shadow: 0 5px 6px rgba(0,0,0,0.3);

  transition: all 2s 0.5s, opacity 1s 0.5s, text-shadow 4s 1s;
}
#message.signed-up {
  opacity: 1;
  top: 200px;
  letter-spacing: 8px;
  z-index: 11;

  transition: all 2s 0.5s, opacity 1s 1.5s;
}

.content {
  display: flex;
  flex-direction: column;
}

.container {
  text-align: center;
  position: relative;
  overflow: hidden;  
  /* this fixes the overflow:hidden bug */

  width: 600px;
  height: 600px;
  background-color: $primary;
  box-shadow: rgba(0, 0, 0, 0.5) 0px 10px 30px, rgba(0,0,0,0.4) 0px 0px 200px;
  z-index: 1;

  border-radius: 50%;
  margin: calc(50vh - 300px) 0 0 calc(50vw - 300px);
  padding: 40px 40px 0 40px;
}
.container.signed-up{
  background-color: #482C3D;
  transition: all 1s;

  animation: sky-color 5s ease;
}

.form{
  padding: 50px;
  background-color: $bg;
  width: 100%;
  height: 100%;
  z-index: 10;
  border-radius: 50%;

  box-shadow: 0px 0px 0px 0px rgba(100,100,100,0), 0px 0px 0px 0px rgba(100,100,100,0);
}

.form.signed-in{
  background-color: $bg;
  transform: translateY(100%) rotate(90deg) scale(2, 2);
  box-shadow: 0px 100px 0px 20px rgba(1,1,1,0.3), -30px -90px 0px 5px rgba(1,1,1,0.2);

  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 2s 1s;
}

.form.signed-up{
  background-color: $bg;
  transform: translateY(100%) rotate(90deg) scale(2, 2);
  box-shadow: 0px 70px 0px 10px rgba(255,255,255,0.3), -10px -70px 0px 5px rgba(255,255,255,0.2);

  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 2s 1s;
}

form {
  margin: 0 auto;
  width: 70%;
  height: 300px;
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px $bg inset;
}

.sign--type {
  animation: slideUp 0.8s cubic-bezier(0.37, 0.82, 0.2, 1);
}
input:first-of-type {
  animation: slideUp 0.8s cubic-bezier(0.37, 0.82, 0.2, 1) 0.1s;
}
 input:nth-of-type(2) {
  animation: slideUp 0.8s cubic-bezier(0.37, 0.82, 0.2, 1) 0.2s;
}
 input:nth-of-type(3) {
  animation: slideUp 0.8s cubic-bezier(0.37, 0.82, 0.2, 1) 0.3s;
}
 input:nth-of-type(4) {
  animation: slideUp 0.8s cubic-bezier(0.37, 0.82, 0.2, 1) 0.4s;
}

#sun{
  position: absolute;
  width: 120px;
  height: 120px;
  left: 50%; 
  margin-left: -60px;
  border-radius: 50%;
  background-color: #FFDD59;
  box-shadow:  0 0 10px #FFDD59, 0 0 50px yellow;
  margin-top: 60%;
  z-index: -1;

  transition: all cubic-bezier(.87,-.41,.19,1.44) 0.4s;
}
#sun.signed-in{
  margin-top: 10%;
  background-color: #FFDD59;
  box-shadow: 0 0 10px #FFDD59, 0 0 50px yellow;
  z-index: -1;

  transition: all 2s cubic-bezier(.84,.33,.37,1.42) 0.5s;
}
#sun.signed-up{
  box-shadow:  0 0 10px #D8973C, 0 0 50px yellow;
  background-color: #FFBB00;
  animation: sunny 4s linear;
}

.spacer{
  display: block;
  width: 100%;
  height: 40px;
  background-color: transparent;
}
input.text-box {
  font-size: 90%;
  display: block;
  width: 100%;
  height: 42px;
  margin-bottom: 12px;
  padding: 16px 13px;
  color: rgba(0,0,0,0.65);
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(0,0,0,0);
  border-radius: 2px;
}
input.text-box::-webkit-input-placeholder {
  font-size: 90%;
  color: rgba(0,0,0,0.4);
}
input.text-box:focus {
  border-color: rgba(211,49,68,0.5);
}
input.submit {
  font-size: 100%;
  line-height: 16px;
  display: block;
  width: 100%;
  height: 42px;
  cursor: pointer;
  vertical-align: middle;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,1);
  border: 0 solid rgba(0,0,0,0.8);
  background: $body-bg;
  margin-top: 0px;

  box-shadow: 0 2px 0 $bg, 0 6px 0 $body_bg;

  transition: all 0.4s;
}
input.submit:hover {
  background: $primary;
  box-shadow: 0 2px 0 $bg, 0 6px 0 $primary, 0 8px 0 $bg, 0 11px 0 $primary;
  margin-top: -2px;
  transition: all 0.2s;
}
input.submit:active{
  transition: all 0.1s;
  margin-top: 15px;
  box-shadow: 0 0px 0 $bg, 0 3px 0 $primary, 0 0px 0 $bg, 0 6px 0 $primary;
} 

input:focus {
  outline: none;
}
.submit-wrap {
  position: absolute;
  bottom: 0;
  width: 100%;
}
.signup--content {
  display: none;
}
.sign--type{
  padding: 0;
  opacity: 0.8;
}

@keyframes slideUp {
  0% {
    opacity: 0;
    margin-top: 100%;
  }
  100% {
    opacity: 1;
    margin-top: 0%;
  }
}


@keyframes sunny {
  from {
    margin-top: 30%;
    margin-left: -60px;
    transform: rotate(-90deg)
               translate(-200px)
               rotate(90deg);
  }
  to {
    margin-top: 30%;
    margin-left: -60px;
    transform: rotate(270deg)
               translate(-200px) 
               rotate(-270deg);
  }
}

@keyframes sky-color {
  0%{
      background-color: $primary;
  }
  5% {
      background-color: #482C3D;
  }
  50%{
      background-color: #258EA6;
  }
  100%{
      background-color: #482C3D;
  }
}

              
            
!

JS

              
                var content = $('.content'),
  form = $('.form'),
  message = $('#message'),
  animatable = $('.animatable'),
  signedIn = 'signed-in',
  signedUp = 'signed-up';

//Toggle between forms
$('.sign--type .link').click(function() {
  content.hide();
  if ($(this).hasClass('signin')) {
    $('.signin--content').show();
  } 
  else if ($(this).hasClass('signup')) {
    $('.signup--content').show();
  }
});

//On form submit
$('form').submit(function () {
  sendForm($(this).attr('id'));
  return false;
});

//Animate form and wait for reset
function sendForm(form) {
  setTimeout(function() {
    animateForm(form);
  }, 200);
  setTimeout(reset, 5000);
}

function animateForm(frm) {
  animatable.addClass(frm);
  content.hide(300);

  //check which form to call appropriate animation
  if (frm == signedIn) {
    message.text("welcome back");
  } else if (frm == signedUp) {
    message.text("welcome to")
    $('.container').addClass(signedUp);
  }
}

//reset form
function reset() {  
  content.hide();
  if (form.hasClass(signedIn)) {
    $('.signin--content').show();
    animatable.removeClass(signedIn);
  }
  if (form.hasClass(signedUp)) {
    $('.signup--content').show();
    animatable.removeClass(signedUp);
    $('.container').removeClass(signedUp);
  }
  message.text(null);
}
              
            
!
999px

Console