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

              
                <form>
  <formfield id="ccn">
    <label for="ff1_input">Credit Card Number</label>
    <input id="ff1_input" type="text" maxlength="4" placeholder="0000" name="cno" autofocus/>
    <input type="text" maxlength="4" placeholder="0000" name="cno"/>
    <input type="text" maxlength="4" placeholder="0000" name="cno"/>
    <input type="text" maxlength="4" placeholder="0000" name="cno"/>
  </formfield> 
  <formfield id="ch">
    <label for="ff2_input">Card Holder</label>
    <input id="ff2_input" type="text" placeholder="First Name"/>
    <input type="text" placeholder="Last Name"/>
  </formfield>  
  <formfield id="ed">
    <label>Expiration Date</label>
    <select id="month">
      <option value="01">01</option>
      <option value="02">02</option>
      <option value="03">03</option>
      <option value="04">04</option>
      <option value="05">05</option>
      <option value="06">06</option>
      <option value="07">07</option>
      <option value="08">08</option>
      <option value="09">09</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
    </select>
    <select id="year">
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
      <option value="24">24</option>
      <option value="25">25</option>
      <option value="26">26</option>
      <option value="27">27</option>
      <option value="28">28</option>
      <option value="29">29</option>
      <option value="30">30</option>
      <option value="31">31</option>
      <option value="32">32</option>
      <option value="33">33</option>
      <option value="34">34</option>
      <option value="35">35</option>
      <option value="36">36</option>
      <option value="37">37</option>
      <option value="38">38</option>
      <option value="39">39</option>
      <option value="40">40</option>
    </select>
  </formfield>
  <formfield id="sc">
    <label for="ff4_input">Security Code</label>
    <input id="ff4_input" type="text" maxlength="3" placeholder="000"/>
  </formfield> 
  <formfield id="cc">
    <label>Credit Card</label>
    <label class="cards">
      <input type="radio" name="cards" checked="checked"/>
      <div id="visa"></div>
    </label>
    <label class="cards">
      <input type="radio" name="cards"/>
      <div id="amex"></div>
    </label>
    <label class="cards">
      <input type="radio" name="cards"/>
      <div id="mastercard"></div>
    </label>
    <label class="cards">
      <input type="radio" name="cards"/>
      <div id="discover"></div>
    </label>
  </formfield>
  <input type="submit" value="submit"/>
</form>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Maven+Pro:400,500,700);
* {
	padding: 0;
	margin: 0;
  box-sizing: border-box;
}

*:after {
  content: '';
  clear: both;
  display: table;
}

:focus {
  outline: none;
}

html {
	font-family: 'Maven Pro';
}

body {
	min-height: 100vh;
	background: linear-gradient(to top left, #70B4F9 0%, #68FFF2 100%);
}

form {
	position: relative;
	margin: auto;
	margin-top: 150px;
  padding: 30px;
	width: 600px;
	background: rgba(255,255,255,1);
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
	box-shadow: 0px 30px 100px -40px #000;
}

form:before {
	position: absolute; 
	content: 'Checkout';
	text-align: center;
	text-transform: uppercase;
	font-size: 5em;
	font-weight: bold;
	color: #00D2FF;
	top: -100px;
	left: 0;
	width: 100%;
	height: 100px;
	background: rgba(255,255,255,.4);
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}

formfield {
  float: left;
  width: 100%;
}

label {
  float: left;
  width: 100%;
  font-size: 1.2em;
  font-weight: 500;
  line-height: 1.6em;
  margin-bottom: 5px;
  color: #92A3A6;
}

input, select, button {
  float: left;
  background: transparent;
  border: 2px solid #EBEBEB;
  border-radius: 3px;
  padding: 5px 10px;
  margin: 0 10px 10px 0;
  font-size: 1em;
  line-height: 2em;
  color: rgba(146,163,166,1);
  transition: border 300ms ease-in;
}

input:focus, select:focus {
  border-color: #20A8FF;
}

input::-webkit-input-placeholder {
  color: rgba(146,163,166,.5);
}

input[type="submit"] {
  float: right;
  margin-top: 33px;
  width: calc(35% - 10px);
  background: #F7D055;
  border: none;
  color: rgba(0,0,0,.6);
  font-weight: 700;
  text-transform: uppercase;
  transition: all 200ms ease-in;
}

input[type="submit"]:hover {
  background: #FFDC70;
  cursor: pointer;
}

#ccn input[type="text"] { 
  width: calc(25% - 10px); 
  letter-spacing: 10px;
  text-align: center;
}

#ch input[type="text"] { 
  width: calc(50% - 10px);  
  text-align: start;
}

#ed, #sc {
  width: 50%;
}

#sc input[type="text"] {
  width: calc(100% - 10px);  
}

#ed select {
  background: #fff;
  height: 46px;
  width: calc(50% - 10px);  
  line-height: 2em;
  text-align: center;
}

#cc {
  width: 50%;
} 

label.cards {
  float: left;
  width: calc(25% - 10px);
  margin: 0 10px 10px 0;
}

label.cards div {
  width: 100%;
  height: 40px;
  margin: 0 10px 10px 0;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,.5);
  transition: all 200ms ease-in;
}

label.cards div:hover {
  cursor: pointer;
}

label.cards div#visa {
  background: url(https://dl.dropboxusercontent.com/u/88446111/daily%23002/1.png) center center;
}

label.cards div#amex {
  background: url(https://dl.dropboxusercontent.com/u/88446111/daily%23002/2.png) center center;
}

label.cards div#mastercard {
  background: url(https://dl.dropboxusercontent.com/u/88446111/daily%23002/3.png) center center;
}

label.cards div#discover {
  background: url(https://dl.dropboxusercontent.com/u/88446111/daily%23002/4.png) center center;
}

label.cards > input {
  display: none;
}

label.cards > input:checked + div {
  border-color: #20A8FF;
}
              
            
!

JS

              
                /* Credit Card icons https://dribbble.com/shots/1115380-SVG-Credit-Cards */
              
            
!
999px

Console