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

              
                <!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style media="screen">
  @import url('https://fonts.googleapis.com/css?family=Open+Sans');

*{
margin: 0;
padding: 0;
box-sizing: border-box;
outline: none;
font-family: 'Open Sans', sans-serif;
}

body{
background: rgb(12, 18, 27);
background-size: cover;
width: 100%;
height: 100vh;
font-size: 16px;
}



.container{
max-width: 500px;
height: auto;
margin: 60px auto;
background: #fff;
padding: 20px 40px 30px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-top: 5px solid #5f6c7d;
}

.title{
color: #d1d9e3;
font-size: 1.8em;
background: rgb(15, 72, 156);
text-align: center;
text-transform: uppercase;
font-weight: 900;
margin-top: -20px;
margin: -20px -40px;
margin-bottom: 30px;
}

.input-form{
margin-bottom: 20px;
}

.input-form .label{
  display: block;
  font-size: 1em;
  color: #212121;
  text-transform: capitalize;
  margin-bottom: 8px;
}

.input-form .items{
margin-bottom: 20px;
}

.section-1 .items .input,
.section-2 .items .input,
.section-3 .items .input{
  background: transparent;
  border: 2px solid #BDBDBD;
  width: 100%;
  padding: 10px;
  font-size: 1em;
  color: #212121;
  border-radius: 3px;
}

.input-form .section-3{
display: flex;
justify-content: space-between;
}

.input-form .section-3 .items{
 width: 48%;
}

.btn{
background: #2d6fe7;
color: #fff;
font-size: 1.25em;
padding: 10px 0;
text-align: center;
text-transform: uppercase;
border-radius: 5px;
cursor: pointer;
font-weight: bold;
letter-spacing: 2px;
}

.cvc{
display: flex;
justify-content: space-between;
position: relative;
transition: all 0.3s ease;
}

.cvc .tooltip{
color: #115e9f;
border: 2px solid #1d56e7;
border-radius: 50%;
width: 25px;
height: 25px;
text-align:center;
cursor: pointer;
}

.cvc .cvc-img{
position: absolute;
top: -300%;
right: 0;
background: #5f6c7d;
padding: 12px;
border-radius: 5px;
display: none;
}

.cvc .cvc-img img{
width: 100px;
height: auto;
display: block;
}

.cvc:hover .cvc-img{
display: block;
}

@media screen and (max-width: 460px){
.input-form .section-3{
  flex-direction: column;
}
.input-form .section-3 .items{
   width: 100%;
}
.input-form .items{
  margin-bottom: 10px;
}

.input-form{
  margin-bottom: 15px;
}
.title{
  font-size: 1.5em;
  margin-bottom: 15px;
}
}
  </style>
</head>
<body>

    <div class="container">
      <div class="title">Checkout Form</div>

      <div class="input-form">
        <div class="section-1">
          <div class="items">
            <label class="label">card number</label>
            <input type="text" class="input" maxlength="16" data-mask="0000 0000 0000 0000"placeholder="1234 1234 1234 1234">
          </div>
        </div>
        <div class="section-2">
          <div class="items">
            <label class="label">card holder</label>
            <input type="text" class="input" placeholder="Coding Market">
          </div>
        </div>
        <div class="section-3">
          <div class="items">
            <label class="label">Expire date</label>
            <input type="text" class="input" data-mask="00 / 00" placeholder="MM / YY">
          </div>
          <div class="items">
            <div class="cvc">
              <label class="label">cvc code</label>
              <div class="tooltip">?
                <div class="cvc-img"><img src="https://i.imgur.com/r8oXtry.png" alt=""></div>
              </div>
            </div>
            <input type="text" class="input" data-mask="0000" placeholder="0000">
          </div>
        </div>
      </div>

      <div class="btn">proceed</div>

    </div>


</body>
</html>

              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console