cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

              <link href='https://fonts.googleapis.com/css?family=Gloria+Hallelujah' rel='stylesheet' type='text/css'>

<link href="https://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
  <div id="wrapper">
    <h1>Custom Checkbox <i class="fa fa-check"></i> </h1>
    <h2>A Pen by <a href="http://www.andrecortellini.com" target="_blank"><span>André Cortellini</span></a></h2>
        <input type="checkbox" id="check1"/>
        <label for="check1">
          <div><i class="fa fa-check"></i></div> I like Codepen!
        <input type="checkbox" id="check2"/>
        <label for="check2">
          <div><i class="fa fa-check"></i></div> I'm a designer
        <input type="checkbox" id="check3"/>
        <label for="check3">
          <div><i class="fa fa-check"></i></div> I shouldn't be looking at this right now
        <input type="checkbox" id="check4"/>
        <label for="check4">
          <div><i class="fa fa-check"></i></div> Pasta is my favourite food
        <input type="checkbox" id="check5"/>
        <label for="check5">
          <div><i class="fa fa-check"></i></div> This Pen sucks!
        <input type="checkbox" id="check6"/>
        <label for="check6">
          <div><i class="fa fa-check"></i></div> I already knew how to create custom checkboxes
        <input type="checkbox" id="check7"/>
        <label for="check7">
          <div><i class="fa fa-check"></i></div> I thought it was harder
        <input type="checkbox" id="check8"/>
        <label for="check8">
          <div><i class="fa fa-check"></i></div> I'm aware that no JavaScript is required
              *{	margin:0;	padding:0; }

	font-family: 'Gloria Hallelujah', cursive;	

h2{	font-size:20px;	margin-bottom:50px;}

#wrapper{ margin: 40px auto 0;	width:500px; }
#wrapper > div{	margin-bottom:10px;	}

input{ display:none; }

label div{
	border:2px solid #fff;

label i{ font-size:16px;	opacity:0; }
label:hover div{ background:#16a085; }
input:checked+label i{ opacity:1; }
input:checked+label div{ background:#16a085; }
              /* ONLY HTML & CSS - NO JAVASCRIPT */
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................