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

              
                .open Open Modal
.modal
  .form
    form
      label(for='name' required) Full Name
      input#name(type='text')
      label(for='email' required) Email Address
      input#email(type='email')
      label(for='pass') Password
      input#pass(type='password' required)
      button(type='button') Sign Up
  .invite
    h3 Register now for our award-winning service and get a 14 day free trial.
    .nope No thanks, I dont like saving money
    .close(title='close')
              
            
!

CSS

              
                *, :before,:after {
  box-sizing: border-box;
  margin: 0;
  transition: .4s
}

body {
  background: lighten(#474747, 10%) url(https://images.unsplash.com/photo-1452716726610-30ed68426a6b?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&w=1080&fit=max&s=177c2914fe84d20069f207e27632acc9) center/cover no-repeat;
  height: 100vh;
  overflow: hidden;
  color: #FFF;
  font-family: Roboto;
}

.modal {
  height: 400px;
  width: 650px;
  margin: auto;
  box-shadow: 0 15px 35px rgba(#000, .5);
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  transition: .4s, box-shadow .3s .4s;
  &.hidden {
    box-shadow: none;
    transition: .4s, box-shadow 0s;
    opacity: 0;
    visibility: hidden;
    .form {
      top: 100%;
    }
    .invite {
      top: -100%;
      .close {
        height: 0;
        width: 0;
        top: 0;
        right: 0;
      }
    }
  }
}

.form, .invite {
  background: rgba(#474747, .8);
  width: 50%;
  height: 100%;
  padding: 25px;
  position: absolute;
  top: 0;
  left: 0;
}

input {
  background: rgba(#FFF, .15);
  width: 100%;
  padding: 8px;
  margin: 15px 0;
  border: none;
  border-radius: 3px;
  outline: none;
  color: #FFF;
  font-size: 20px;
  &:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 500px lighten(#474747, 20%) inset;
    -webkit-text-fill-color: #FFF;
  }
}

label {
  font: 500 14px Roboto;
  color: #FB5781;
}

button {
  background: linear-gradient( -45deg, #f857a6 , #ff5858);
  padding: 10px 20px;
  border: none;
  border-radius: 21px;
  outline: none;
  overflow: hidden;
  position: absolute;
  bottom: 30px;
  left: 50%;
  color: #FFF;
  font-size: 18px;
  cursor: pointer;
  transform: translateX(-50%);
  &:hover:before {
    left: 110%;
    transition: .3s;
  }
  &:before {
    content: '';
    background: rgba(#FFF, .3);
    height: 100%;
    width: 65px;
    position: absolute;
    top: 0;
    left: -100%;
    transform: skew(-45deg);
    transition: 0s;
  }
}

.invite {
  background: linear-gradient( -45deg, #f857a6 , #ff5858);
  left: 50%;
}

h3 {
  font: 30px Roboto;
  text-transform: uppercase;
}

.nope {
  background: #474747;
  padding: 10px 15px;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(#000, .25);
  position: absolute;
  bottom: 30px;
  left: 50%;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transform: translateX(-50%);
  &:hover {
    box-shadow: 0 5px 10px rgba(#000, .25);
    transform: translateX(-50%);
  }
}

.close {
  background: #474747;
  height: 30px;
  width: 30px;
  border: 3px solid #FFF;
  border-radius: 50%;
  position: absolute;
  top: -15px;
  right: -15px;
  cursor: pointer;
  transition: .4s .3s;
  &:before, &:after {
    content: '';
    background: #FFF;
    height: 80%;
    width: 3px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
  }
  &:after {
   transform: translate(-50%, -50%) rotate(45deg); 
  }
}

.open {
  background: linear-gradient( -45deg, #f857a6 , #ff5858);
  height: 45px;
  width: 150px;
  padding: 10px 20px;
  margin: auto;
  position: absolute;
  top: 0; bottom: 0;
  left: 0; right: 0;
  font-size: 20px;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  &.active {
    opacity: 1;
    visibility: visible;
  }
  &:hover {
    box-shadow: 0 5px 15px rgba(#000, .3);
  }
}
              
            
!

JS

              
                $(".close, .nope").on('click', function () {
  $('.modal').addClass('hidden');
  $('.open').addClass('active');
})

$(".open").on('click', function () {
  $(this).removeClass('active');
  $('.modal').removeClass('hidden');
})
              
            
!
999px

Console