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

              
                <div id="page-wrapper">
      <div id="modal-wrapper">
        <div id="modal">
          <div id="cards">
            <div class="card" id="login">
              <div class="box">
                <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="84px" height="70px" viewBox="0 0 600 332" enable-background="new 0 0 600 332" xml:space="preserve">
                  <path id="SVGID_1_" d="M48.207,322.346H2.201l195.546-296.91l29.083,24.881L48.207,322.346L48.207,322.346z M366.916,323.3L184.581,45.545l22.235-34.362l182.337,277.754L366.916,323.3L366.916,323.3z M206.816,322.346c0,0-32.511-50.283-67.621-102.999c-7.233-10.859-14.576-21.821-21.768-32.47c-0.586-0.867,14.985-46.926,21.658-36.678c7.217,11.086,14.388,22.232,21.347,33.138c36.734,57.58,67.509,108.465,67.509,108.465L206.816,322.346L206.816,322.346z M313.043,162.238l-39.053,59.399c-31.744,48.284-57.467,87.41-57.467,87.41l-31.942-22.019c0,0,29.998-44.644,67.215-101.253c5.132-7.806,10.351-15.742,15.577-23.694c4.91-7.47,9.831-14.953,14.699-22.356C321.356,79.969,366.42,11.184,366.42,11.184h45.049C411.469,11.184,353.769,100.292,313.043,162.238L313.043,162.238z M375.986,309.048l-29.083-24.882L526.486,11.184h45.046L375.986,309.048L375.986,309.048z"></path>
                </svg>
              </div>
              <form id="login-form">
                <label>Email
                  <a href="#" title="Forgot email?" class="tip">Forgot email?</a>
                </label>
                <input type="text" id="login-email" class="textbox">
                <label>Password
                  <a href="#" title="Forgot password?" class="tip">Forgot password?</a>
                </label>
                <input type="password" id="login-password" class="textbox">
              </form>
              <button type="submit" class="proceed">Log-in to your account <i class="ion-ios-arrow-thin-right"></i></button>
            </div>
            <div class="card" id="register">
              <div class="box">
              <div id="branding-small">
                <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="42px" height="35px" viewBox="0 0 600 332" enable-background="new 0 0 600 332" xml:space="preserve">
                  <path id="SVGID_1_" d="M48.207,322.346H2.201l195.546-296.91l29.083,24.881L48.207,322.346L48.207,322.346z M366.916,323.3L184.581,45.545l22.235-34.362l182.337,277.754L366.916,323.3L366.916,323.3z M206.816,322.346c0,0-32.511-50.283-67.621-102.999c-7.233-10.859-14.576-21.821-21.768-32.47c-0.586-0.867,14.985-46.926,21.658-36.678c7.217,11.086,14.388,22.232,21.347,33.138c36.734,57.58,67.509,108.465,67.509,108.465L206.816,322.346L206.816,322.346z M313.043,162.238l-39.053,59.399c-31.744,48.284-57.467,87.41-57.467,87.41l-31.942-22.019c0,0,29.998-44.644,67.215-101.253c5.132-7.806,10.351-15.742,15.577-23.694c4.91-7.47,9.831-14.953,14.699-22.356C321.356,79.969,366.42,11.184,366.42,11.184h45.049C411.469,11.184,353.769,100.292,313.043,162.238L313.043,162.238z M375.986,309.048l-29.083-24.882L526.486,11.184h45.046L375.986,309.048L375.986,309.048z"></path>
                </svg>
              </div>
                <div class="box-header">Register</div>
                <form id="register-form">
                  <label>Email</label>
                  <input type="text" id="register-email" class="textbox">
                  <label>Password</label>
                  <input type="password" id="register-password" class="textbox">
                  <label>Confirm Password</label>
                  <input type="password" id="register-password-conf" class="textbox">
                </form>
              </div>
              <button type="submit" class="proceed">Create an account <i class="ion-ios-arrow-thin-right"></i></button>
            </div>
          </div>
          <div id="toggle-tabs">
            <div class="tab" id="toggle-login">Sign In</div>
            <div class="tab" id="toggle-register">Register</div>
          </div>
        </div>
      </div>
    </div>
              
            
!

CSS

              
                /**
* Daily UI :: 001
* Design a sign up page, modal, form, app screen, etc.
**/

// Color Palette
// Inspired by 'Adrift in Dreams' - Skyblue2u - Colourlovers.com

$sunlit-sea: rgb(207,240,158);
$sea-foaming: rgb(168,219,168);
$sea-showing-green: rgb(121,189,154);
$there-we-could-sail: rgb(59,134,134);
$adrift-in-dreams: rgb(11,72,107);

$lucky-sevens: rgb(119,119,119);
$emptiness: rgb(255,255,255);

// Additional Variables

$modal-width: 430px;
$modal-shadow-opacity: .32;
$modal-inner-shadow-opacity: .2;
$modal-shadow-color: rgb(0,0,0);
$modal-shadow-blur: 27px;
$modal-shadow-offset: 34px;

// Gradient Mixins

@mixin primary-gradient {   // $sea-showing-green->$there-we-could-sail
  background: $there-we-could-sail;
  background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMTAwJSI+CiAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjM2I4Njg2IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzc5YmQ5YSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
  background: -moz-linear-gradient(-45deg,  rgba($there-we-could-sail,1) 0%, rgba($sea-showing-green,1) 100%);
  background: -webkit-linear-gradient(-45deg,  rgba($there-we-could-sail,1) 0%,rgba($sea-showing-green,1) 100%);
  background: linear-gradient(135deg,  rgba($there-we-could-sail,1) 0%,rgba($sea-showing-green,1) 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{ie-hex-str($there-we-could-sail)}', endColorstr='#{ie-hex-str($sea-showing-green)}',GradientType=1 );
}

@mixin button-gradient {  // $there-we-could-sail->$adrift-in-dreams
  background: $there-we-could-sail;
  background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIxMDAlIiB5Mj0iMTAwJSI+CiAgICA8c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjM2I4Njg2IiBzdG9wLW9wYWNpdHk9IjEiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzBiNDg2YiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2dyYWQtdWNnZy1nZW5lcmF0ZWQpIiAvPgo8L3N2Zz4=);
  background: -moz-linear-gradient(-45deg,  rgba($there-we-could-sail,1) 0%, rgba($adrift-in-dreams,1) 100%);
  background: -webkit-linear-gradient(-45deg,  rgba($there-we-could-sail,1) 0%,rgba($adrift-in-dreams,1) 100%);
  background: linear-gradient(135deg,  rgba($there-we-could-sail,1) 0%,rgba($adrift-in-dreams,1) 100%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{ie-hex-str($there-we-could-sail)}', endColorstr='#{ie-hex-str($adrift-in-dreams)}',GradientType=1 );
}

/**
* Style Declarations
**/

html, body {
  height: 100%;
}

body {
  background: url('https://res.cloudinary.com/exards/image/upload/v1447941004/Majestic_mountains_1920x1080-blue_rr4ucd.jpg');
	background-size: cover;
  font-family: 'Proxima Nova', Arial, Helvetica, sans-serif;
}

#page-wrapper {
  display: table;
  width: 100%;
  height: 100%;
  #modal-wrapper {
    display: table-cell;
    width: 100%;
    height: 100%;
    vertical-align: middle;
  }
}

#modal {
  margin: 0 auto;
  box-shadow: 0px $modal-shadow-offset $modal-shadow-blur rgba($modal-shadow-color,$modal-shadow-opacity), inset 0 0 1px rgba($modal-shadow-color, $modal-inner-shadow-opacity);;
  max-width: $modal-width;
  background: $emptiness;
}

.box {
  @include primary-gradient;
	padding: 40px;
  text-align: center;
  position: relative;
  .box-header {
    font-size: 1.75em;
    font-weight: 300;
    color: white;
    text-align: left;
    margin: 0 0 36px;
  }
	svg {
		fill: white;
	}
}

button.proceed {
  display: block;
  width: 100%;
  padding: 20px 0;
  color: $emptiness;
  @include button-gradient;
  border: 0;
  font-size: 1em;
  font-weight: bold;
  font-family: 'Proxima Nova', Arial, Helvetica, sans-serif;
  cursor: pointer;
  i {
    font-size: .8em;
  }
}

#login-form {
  padding: 40px;
  input {
    border: 1px solid #ddd;
    color: $sea-showing-green;
  }
  label {
    color: $lucky-sevens;
  }
}

#register-form {
  input {
    border: 1px solid $emptiness;
    color: $emptiness - #111;
  }
  label {
    color: $emptiness;
  }
}

label {
  display: block;
  text-align: left;
  margin: 20px 0 6px;
  font-family: 'Proxima Nova', sans-serif;
  &:first-child {
		margin-top: 0;
	}
  .tip {
    float: right;
		font-size: 13px;
		text-decoration: underline;
		cursor: pointer;
		color: #3B8686;
		font-weight: bold;
  }
}

input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px;
  font-family: 'Proxima Nova', Arial, Helvetica, sans-serif;
  font-size: 1em;
  background: transparent;
}

#toggle-tabs {
  display: table;
  width: 100%;
  .tab {
    font-size: 1em;
    display: table-cell;
    width: 50%;
    padding: 20px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
    &#toggle-login {
      color: $sea-showing-green;
    }
    &#toggle-register {
      color: $emptiness;
      background: $sea-showing-green;
    }
  }
}

#branding-small {
  position: absolute;
  top: 36px; right: 36px;
  svg {
		fill: white;
	}
}

              
            
!

JS

              
                var login = $('#login');
var register = $('#register');
var button_login = $('#toggle-login');
var button_register = $('#toggle-register');
var box = $('.box');

$(function() {

  register.hide();

  button_register.click(function() {
    login.slideUp(1000);
    register.slideDown(1000);
  });
  button_login.click(function() {
    register.slideUp(1000);
    login.slideDown(1000);
  });
});

              
            
!
999px

Console