cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <div class="form-outer-wrapper">
  <div class="form-submitted-card">
    <a href="#" class="close">Close</a>
    <svg version="1.1" id="svg-tick" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="64px" height="64px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">
  <g>
    <path fill="#535A9A" d="M32,0.896C14.85,0.896,0.896,14.849,0.896,32C0.896,49.151,14.85,63.104,32,63.104
      c17.15,0,31.104-13.952,31.104-31.104C63.104,14.849,49.15,0.896,32,0.896z M32,60.711C16.17,60.711,3.289,47.83,3.289,32
      S16.17,3.289,32,3.289S60.711,16.17,60.711,32S47.83,60.711,32,60.711z"/>
    <path fill="#535A9A" d="M46.657,19.243L28.271,39.927l-11.076-8.861c-0.515-0.413-1.269-0.328-1.681,0.187
      c-0.413,0.517-0.329,1.269,0.187,1.682l11.962,9.57c0.221,0.176,0.485,0.262,0.748,0.262c0.33,0,0.659-0.137,0.895-0.402
      l19.14-21.533c0.439-0.493,0.395-1.25-0.1-1.688C47.853,18.703,47.097,18.748,46.657,19.243z"/>
  </g>
    </svg>
    <h2 class="form-submitted-title">
      Thankyou!
    </h2>
    <p class="message">You will receive a confirmation email shortly.</p>
  </div>
  <div class="form-wrapper">
    <form method="GET" id="signup-form" clas="form-signup">
      <h1 class="form-title">Sign Up</h1>
      <label for="username">Username</label>
      <input type="text" placeholder="Username" class="field-username" value="">
      <label for="email">Email</label>
      <input type="email" placeholder="Email" class="field-email" value="">
      <input type="submit" class="field-submit" value="Submit" />
    </form>
  </div>
</div>
            
          
!
            
              $color1: rgba(6, 141, 157, 1);
$color2: rgba(83, 89, 154, 1);
$color3: rgba(109, 157, 197, 1);
$color4: rgba(128, 222, 217, 1);
$color5: rgba(174, 236, 239, 1);

html {
  height: 100%;
}

body {
  background: linear-gradient(to bottom right, $color5, $color1);
  font-family: 'Fira Sans', sans-serif;
}
 
.form-outer-wrapper {
  display: flex;
  flex-direction: column;
  align-content: stretch;
  flex-wrap: wrap;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s ease-in;
  margin: 5vh auto;
  width: 70vw;
  perspective: 1000px;
  
  @media screen and (min-width: 600px) {
    width: 40vw;
    max-width: 380px;
  }
  
  & > div {
    border-top: 10px solid $color2;
    border-bottom: 10px solid $color2;
    background: #FFF;
    backface-visibility: hidden;
    padding: 2%;
    box-shadow: 4px 4px 2px rgba(0,0,0,0.1);

  }
}

//////////////////////////////////// 
// Front of card
//////////////////////////////////// 

.form-wrapper {
  transform: rotateY( 0deg );
  transition: transform 1s ease;
  width: 100%;
  height: 100%;

  &:before {
    content: '';
    width: 128px;
    height: 128px;
    max-width: 256px;
    max-height: 256px;
    display: block;
    margin: 20px auto 0;
    background-size: cover;
    background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc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zgsMTAuNjY5LTEwLjY4NkMxNDkuMjk1LDI5Mi43MTEsMTQ0LjUzLDI4Ny45MywxMzguNjI1LDI4Ny45M3oiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==);
  }  
}

.is-submitted .form-wrapper {
  transform: rotateY( 180deg );
  transition: 1s ease;
}

.form-signup {
  padding: 0 40px;
}

label {
  color: $color2;
  display: block;
  margin: 10px 10px 3px 7vw;
  font-size: 12px;
  
  @media screen and (min-width: 600px) {
    margin: 10px 10px 3px 4vw;
  }
}

* {
  box-sizing: border-box;
}

input {
  display: block;
  
  &[type="text"],
  &[type="email"] {
    border-radius: 5px;
    border: 2px solid $color2;
    background-color: transparent;
    margin-bottom: 10px;
    width: 80%;
    line-height: 2em;
    color: $color2;
    margin: 0 auto;
    padding: 5px 10px;
    
    &::placeholder {
      color: lighten($color2, 20%);
    }
    
    &:focus {
      background: mix(#FFF, #000, 95%); 
      outline: none;
    }
  }
  
    &[type="submit"] {
      appearance: none;
      -webkit-appearance: none;    
      background-color: $color3;
      border: 0;
      border-radius: 5px;
      box-shadow: 0 2px 0px #CCC;
      display: block;
      color: #FFF;
      line-height: 2.4em;
      margin: 30px auto 20px;
      text-transform: uppercase;
      transition: .2s all ease-in;
      font-weight: 700;
      width: 80%;
      
      &:hover {
        background: $color4;
        transition: .2s all ease-in;
      }
      
      &:active {
        box-shadow: 0 0 0 0;
      }
  }
}

.form-title {
  color: $color2;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  margin: 0 0 20px;
}

//////////////////////////////////// 
// Back of card
//////////////////////////////////// 

.form-submitted-card {
  background: #FFF;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY( -180deg );
  transition: transform 1s ease;
  backface-visibility: hidden;
  width: 100%;
  
  .is-submitted & {
    transform: rotateY( 0deg );
  }
}

.form-submitted-title {
  color: $color2; 
  margin-top: 80px;
  text-align: center;
  text-transform: uppercase;
}

.close {
  display: block;
  float: right;
  text-indent: -100%;
  overflow: hidden;
  white-space: nowrap;
  background-size: cover;
  width: 30px;
  height: 30px;
  background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ5MC40IDQ5MC40IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0OTAuNCA0OTAuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIxNnB4IiBoZWlnaHQ9IjE2cHgiPgo8Zz4KCTxnPgoJCTxwYXRoIGQ9Ik0yNDUuMiw0OTAuNGMxMzUuMiwwLDI0NS4yLTExMCwyNDUuMi0yNDUuMlMzODAuNCwwLDI0NS4yLDBTMCwxMTAsMCwyNDUuMlMxMTAsNDkwLjQsMjQ1LjIsNDkwLjR6IE0yNDUuMiwyNC41ICAgIGMxMjEuNywwLDIyMC43LDk5LDIyMC43LDIyMC43cy05OSwyMjAuNy0yMjAuNywyMjAuN3MtMjIwLjctOTktMjIwLjctMjIwLjdTMTIzLjUsMjQuNSwyNDUuMiwyNC41eiIgZmlsbD0iIzUzNTk5YSIvPgoJCTxwYXRoIGQ9Ik0xODAuMywzMTAuMWMyLjQsMi40LDUuNSwzLjYsOC43LDMuNnM2LjMtMS4yLDguNy0zLjZsNDcuNi00Ny42bDQ3LjYsNDcuNmMyLjQsMi40LDUuNSwzLjYsOC43LDMuNnM2LjMtMS4yLDguNy0zLjYgICAgYzQuOC00LjgsNC44LTEyLjUsMC0xNy4zbC00Ny44LTQ3LjZsNDcuNi00Ny42YzQuOC00LjgsNC44LTEyLjUsMC0xNy4zcy0xMi41LTQuOC0xNy4zLDBsLTQ3LjYsNDcuNmwtNDcuNi00Ny42ICAgIGMtNC44LTQuOC0xMi41LTQuOC0xNy4zLDBzLTQuOCwxMi41LDAsMTcuM2w0Ny42LDQ3LjZsLTQ3LjYsNDcuNkMxNzUuNSwyOTcuNiwxNzUuNSwzMDUuMywxODAuMywzMTAuMXoiIGZpbGw9IiM1MzU5OWEiLz4KCTwvZz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);
}

#svg-tick {
  display: block; 
  clear: both;
  transform: scale(3);
  transform-origin: center center;
  margin: 80px auto;
}

.message {
  color: $color2;
  text-align: center;
}
            
          
!
            
              let formEl = document.getElementById('signup-form');
let closeEl = document.getElementsByClassName('close');
let $formOuterWrapEl = $('.form-outer-wrapper');

formEl.addEventListener('submit', function(event) {
  event.preventDefault();
  $formOuterWrapEl.addClass('is-submitted');
});

closeEl[0].addEventListener('click', function(event){
  event.preventDefault();
  $formOuterWrapEl.removeClass('is-submitted');
});


            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console