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">
  <div class="box">
    <div class="container-forms">
      <div class="container-info">
        <div class="info-item">
          <div class="table">
            <div class="table-cell">
              <p>Have an account?</p>
              <div class="btn">Log in</div>
            </div>
          </div>
        </div>
        <div class="info-item">
          <div class="table">
            <div class="table-cell">
              <p>Dont Have an account?</p>
              <div class="btn">Sign up</div>
            </div>
          </div>
        </div>
      </div>
      <div class="container-form">
        <div class="form-item log-in">
          <div class="table">
            <div class="table-cell">
              <input type="text" name="Username" placeholder="Username" />
              <input type="Password" name="Password" placeholder="Password" />
              <div class="btn">Login</div>
            </div>
          </div>
        </div>
        <div class="form-item sign-up">
          <div class="table">
            <div class="table-cell">
              <input type="text" name="email" placeholder="Email" />
              <input type="text" name="fullName" placeholder="Full Name" />
              <input type="text" name="Username" placeholder="Username" />
              <input type="Password" name="Password" placeholder="Password" />
              <div class="btn">Sign up</div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                body {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  font-family: "Roboto", sans-serif;
  background-color: #5356ad;
  overflow: hidden;
}

.table {
  display: table;
  width: 100%;
  height: 100%;
}

.table-cell {
  display: table-cell;
  vertical-align: middle;
  transition: all 0.5s;
}

.container {
  position: relative;
  width: 600px;
  margin: 30px auto 0;
  height: 320px;
  background-color: #999ede;
  top: 50%;
  margin-top: -160px;
  transition: all 0.5s;
}

.container .box {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.container .box:after {
  background-color: #a5aae4;
  top: -10px;
  left: 80px;
  width: 320px;
  height: 180px;
}

.container .container-forms {
  position: relative;
}

.container .btn {
  cursor: pointer;
  text-align: center;
  margin: 0 auto;
  width: 60px;
  color: #fff;
  background-color: #ff73b3;
  opacity: 1;
  transition: all 0.5s;
}

.container .btn:hover {
  opacity: 0.7;
}

.container .btn,
.container input {
  padding: 10px 15px;
}

.container input {
  margin: 0 auto 15px;
  display: block;
  width: 220px;
  transition: all 0.5s;
}

.container .container-forms .container-info {
  text-align: left;
  font-size: 0;
}

.container .container-forms .container-info .info-item {
  text-align: center;
  font-size: 16px;
  width: 300px;
  height: 320px;
  display: inline-block;
  vertical-align: top;
  color: #fff;
  opacity: 1;
  transition: all 0.5s;
}

.container .container-forms .container-info .info-item p {
  font-size: 20px;
  margin: 20px;
}

.container .container-forms .container-info .info-item .btn {
  background-color: transparent;
  border: 1px solid #fff;
}

.container .container-forms .container-info .info-item .table-cell {
  padding-right: 35px;
}

.container
  .container-forms
  .container-info
  .info-item:nth-child(2)
  .table-cell {
  padding-left: 35px;
  padding-right: 0;
}

.container .container-form {
  overflow: hidden;
  position: absolute;
  left: 30px;
  top: -30px;
  width: 305px;
  height: 380px;
  background-color: #fff;
  box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.5s;
}

.container .container-form .btn {
  position: relative;
  box-shadow: 0 0 10px 1px #ff73b3;
  margin-top: 30px;
}

.container .form-item {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
}

.container .form-item.sign-up {
  position: absolute;
  left: -100%;
  opacity: 0;
}

.container.log-in .box:before {
  position: absolute;
  left: 180px;
  top: 62px;
  height: 265px;
}

.container.log-in .box:after {
  top: 22px;
  left: 192px;
  width: 324px;
  height: 220px;
}

.container.log-in .container-form {
  left: 265px;
}

.container.log-in .container-form .form-item.sign-up {
  left: 0;
  opacity: 1;
}

.container.log-in .container-form .form-item.log-in {
  left: -100%;
  opacity: 0;
}

.container.active input,
.container.active .btn,
.container.active .info-item {
  display: none;
  opacity: 0;
  padding: 0px;
  margin: 0 auto;
  height: 0;
}

.container.active .form-item {
  height: 100%;
}

.container.active .container-forms .container-info .info-item {
  height: 0%;
  opacity: 0;
}

.rabbit {
  width: 50px;
  height: 50px;
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 3;
  fill: #fff;
}

              
            
!

JS

              
                document.querySelectorAll(".info-item .btn").forEach((element) => {
  element.addEventListener("click", function () {
    document.querySelector(".container").classList.toggle("log-in");
  });
});
              
            
!
999px

Console