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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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="flexin">

  <div class="tabs tabs-style-flip">
    <nav>
      <ul>
        <li><a href="#section-flip-1"><span><i class="fa fa-lock"></i> Login</span></a></li>
        <li><a href="#section-flip-2"><span><i class="fa fa-user-plus"></i> Sign Up</span></a></li>
      </ul>
    </nav>
    <div class="content-wrap">
      <section id="section-flip-1">

        <form class="ui large form">
          <div class="ui segment">
            <h2 class="ui header">Log-In to Your Account</h2>
            <div class="field">
              <div class="ui left icon input">
                <i class="user icon"></i>
                <input type="text" name="email" placeholder="E-mail address">
              </div>
            </div>
            <div class="field">
              <div class="ui left icon input">
                <i class="lock icon"></i>
                <input type="password" name="password" placeholder="Password">
              </div>
            </div>
            <div class="ui fluid large orange submit button">LOGIN</div>
          </div>
          <div class="ui error message"></div>
        </form>

        <div class="ui message">
          Don't have an account yet? <a href="#">SIGN UP</a>
        </div>
      </section>
      <section id="section-flip-2">

        <form class="ui large form">
          <div class="ui segment">
            <h2 class="ui header">Sign up for an Account</h2>
            <div class="field">
              <div class="ui left icon input">
                <i class="user icon"></i>
                <input type="text" name="email" placeholder="E-mail address">
              </div>
            </div>
            <div class="field">
              <div class="ui left icon input">
                <i class="lock icon"></i>
                <input type="password" name="password" placeholder="Choose a Password">
              </div>
            </div>
            
              <div class="field">
              <div class="ui left icon input">
                <i class="lock icon"></i>
                <input type="password" name="password" placeholder="Confirm Password">
              </div>
            </div>
            <div class="ui fluid large teal submit button">REGISTER</div>
          </div>
          <div class="ui error message"></div>
          <div class="g-recaptcha" style="width: 100%" data-sitekey="6Lcd4RcTAAAAAFdohXyb7LRFrEDkSua3VlVx8IBb"></div>
        </form>
        <div class="ui message">
          Already have an account? <a href="#">LOG IN</a>
        </div>
      </section>
    </div>
    <!-- /content -->
  </div>
  <!-- /tabs -->
</div>
              
            
!

CSS

              
                /* Default tab style */

*,
html,
body {
  font-family: "Open Sans";
}

.flexin {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flexin div.tabs-style-flip {
  max-width: 600px;
  box-shadow: 0px 50px 100px 0px rgba(30, 30, 30, .4);
  border-radius: 6px;
  height: auto;
  flex-grow: 2;
}

.tabs {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  width: 100%;
  font-weight: 400;
}


/* Nav */

.tabs nav {
  text-align: center;
}

.tabs nav ul {
  position: relative;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: -moz-flex;
  display: -ms-flex;
  display: flex;
  margin: 0 auto;
  padding: 0;
  max-width: 1400px;
  list-style: none;
  -ms-box-orient: horizontal;
  -ms-box-pack: center;
  -webkit-flex-flow: row wrap;
  -moz-flex-flow: row wrap;
  -ms-flex-flow: row wrap;
  flex-flow: row wrap;
  -webkit-justify-content: center;
  -moz-justify-content: center;
  -ms-justify-content: center;
  justify-content: center;
}

.tabs nav ul li {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0;
  text-align: center;
  -webkit-flex: 1;
  -moz-flex: 1;
  -ms-flex: 1;
  flex: 1;
}

.tabs nav a {
  position: relative;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 2.5;
  font-size: 1.5em;
}

.tabs nav a span {
  vertical-align: middle;
}

.tabs nav li.tab-current a {
  color: #303030;
}

.tabs nav a:focus {
  outline: none;
}


/* Icons */

.icon::before {
  z-index: 10;
  display: inline-block;
  margin: 0 0.4em 0 0;
  vertical-align: middle;
  text-transform: none;
  font-weight: normal;
  font-variant: normal;
  line-height: 1;
  speak: none;
  -webkit-backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* Content */

.content-wrap {
  position: relative;
}

.content-wrap section {
  display: none;
  margin: 0 auto;
  padding: 1em;
  max-width: 1200px;
  text-align: center;
}

.content-wrap section.content-current {
  display: block;
}

.content-wrap section p {
  margin: 0;
  padding: 0.75em 0;
  color: rgba(40, 44, 42, 0.05);
  font-weight: 900;
  line-height: 1;
}


/* Fallback */

.no-js .content-wrap section {
  display: block;
  padding-bottom: 2em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.no-flexbox nav ul {
  display: block;
}

.no-flexbox nav ul li {
  min-width: 15%;
  display: inline-block;
}

@media screen and (max-width: 58em) {
  .tabs nav a.icon span {
    display: none;
  }
  .tabs nav a:before {
    margin-right: 0;
  }
}


/*****************************/


/* Flip */


/*****************************/

.tabs-style-flip nav a {
  padding: 0.5em 0;
  color: rgba(30, 30, 30, .3);
  -webkit-transition: color 0.5s;
  transition: all 0.3s ease;
  top: 1px;
  z-index: 3;
  position: relative;
}

.tabs-style-flip nav a:first-child() {
  border-radius: 6px 0px 0px 0px;
}

.tabs-style-flip nav a:last-child() {
  border-radius: 0px 6px 0px 0px;
}

.tabs-style-flip nav a:hover,
.tabs-style-flip nav a:focus,
.tabs-style-flip nav li.tab-current a {
  color: rgba(30, 30, 30, .8);
}

.tabs-style-flip nav li.tab-current a {
  color: rgba(30, 30, 30, .8);
}

.tabs-style-flip nav a span {
  text-transform: uppercase;
  //letter-spacing: 1px;
  font-weight: 400;
}

.tabs-style-flip nav a::after {
  position: absolute;
  top: 0px;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  background-color: #eee;
  content: '';
  -webkit-transition: -webkit-transform 0.3s, background-color 0.3s;
  transition: transform 0.3s, background-color 0.3s;
  -webkit-transform: perspective(900px) rotate3d(1, 0, 0, 90deg);
  transform: perspective(900px) rotate3d(1, 0, 0, 90deg);
  -webkit-transform-origin: 50% 100%;
  transform-origin: 50% 100%;
  -webkit-perspective-origin: 50% 100%;
  perspective-origin: 50% 100%;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, .8);
  border-bottom: none;
}

.tabs-style-flip nav li.tab-current a::after {
  background-color: #efefef;
  -webkit-transform: perspective(900px) rotate3d(1, 0, 0, 0deg);
  transform: perspective(900px) rotate3d(1, 0, 0, 0deg);
  box-shadow: inset 0px 0px 0px 0px rgba(30, 30, 30, .1);
}

.tabs-style-flip nav li.tab-current:nth-child(1) a::after {
  border-radius: 6px 0px 0px 0px;
  box-shadow: inset -10px 10px 10px 0px rgba(30, 30, 30, .1);
  transition: box-shadow 0.3s ease .05s;
}

.tabs-style-flip nav li.tab-current:nth-child(2) a::after {
  border-radius: 0px 6px 0px 0px;
  box-shadow: inset 10px 10px 10px 0px rgba(30, 30, 30, .1);
  transition: box-shadow 0.3s ease .05s;
}

.tabs-style-flip .content-wrap {
  background: #efefef;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 0px 0px 6px 6px;
  z-index: 0;
}

.tabs-style-flip .content-wrap .header {
  font-weight: 400;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(30, 30, 30, .2);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.content-wrap .segment {
  border: 1px solid rgba(30, 30, 30, .2);
  box-shadow: 0px 0px 0px 5px rgba(255, 255, 255, .3);
  border-radius: 6px;
  padding: 20px;
}
.content-wrap input {
  padding: 20px !important;
}
              
            
!

JS

              
                /**
 * cbpFWTabs.js v1.0.0
 * http://www.codrops.com
 *
 * Licensed under the MIT license.
 * https://www.opensource.org/licenses/mit-license.php
 * 
 * Copyright 2014, Codrops
 * http://www.codrops.com
 */
;
(function(window) {

  'use strict';

  function extend(a, b) {
    for (var key in b) {
      if (b.hasOwnProperty(key)) {
        a[key] = b[key];
      }
    }
    return a;
  }

  function CBPFWTabs(el, options) {
    this.el = el;
    this.options = extend({}, this.options);
    extend(this.options, options);
    this._init();
  }

  CBPFWTabs.prototype.options = {
    start: 0
  };

  CBPFWTabs.prototype._init = function() {
    // tabs elems
    this.tabs = [].slice.call(this.el.querySelectorAll('nav > ul > li'));
    // content items
    this.items = [].slice.call(this.el.querySelectorAll('.content-wrap > section'));
    // current index
    this.current = -1;
    // show current content item
    this._show();
    // init events
    this._initEvents();
  };

  CBPFWTabs.prototype._initEvents = function() {
    var self = this;
    this.tabs.forEach(function(tab, idx) {
      tab.addEventListener('click', function(ev) {
        ev.preventDefault();
        self._show(idx);
      });
    });
  };

  CBPFWTabs.prototype._show = function(idx) {
    if (this.current >= 0) {
      this.tabs[this.current].className = this.items[this.current].className = '';
    }
    // change current
    this.current = idx != undefined ? idx : this.options.start >= 0 && this.options.start < this.items.length ? this.options.start : 0;
    this.tabs[this.current].className = 'tab-current';
    this.items[this.current].className = 'content-current';
  };

  // add to global namespace
  window.CBPFWTabs = CBPFWTabs;

})(window);





////////////////////////////
////////////////////////////
// CALL IT
////////////////////////////
////////////////////////////
(function() {

  [].slice.call(document.querySelectorAll('.tabs')).forEach(function(el) {
    new CBPFWTabs(el);
  });

})();
              
            
!
999px

Console