cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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.

            
              <!-- :disabled -->
<section class="example-cntr disabled">
    <h1>CSS <code>:disabled</code> pseudo-class</h1>
    <p>The <code>:disabled</code> pseudo-class targets a form element in the disabled state. An element in a disabled state can’t be selected, checked, activated or gain focus.</p>
    <p>As you can see none of these form elements can be used. Notice the <code>disabled</code> attribute in the HTML.</p>
    <form class="flex-ctnr">
        <div>
            <h3>Text Field</h3>
            <input type="text" disabled>
        </div>
        <div>
            <h3>Radio Button</h3>
            <input type="radio" disabled>
        </div>
        <div>
            <h3>Check Box</h3>
            <input type="checkbox" disabled>
        </div>
        <div>
            <h3>Text Area</h3>
            <textarea cols="30" rows="10" disabled></textarea>
        </div>
    </form>
</section>
            
          
!
            
              //:disabled
.disabled {
    text-align: left;
    :disabled {
         opacity: .2;
    }
}



//Styling stuff not needed for demo
body { text-align: left; }
.example-cntr {
    max-width: 800px;
    margin: auto;
    padding: 20px 50px;    
    box-shadow: 0 1px 2px rgba(black,.3);
    background: rgba(black,.15);    
}
h1 {
    text-transform: none;
    border-bottom: #636363 1px dotted;
    code {
        display: inline-block;
        margin-bottom: 10px;
        color: $y;
        background: none;
        box-shadow: none;
    }
}
code { font-size: 1em; }
form {
    width: 100%;
    margin: 40px auto 20px;
    padding: 20px 10px;
    border-radius: 2px;
    font-size: 1.2em;
    text-align: center;
    background: rgba(black,.2);
}
input, label { cursor: pointer; }
input {
    width: 34px; height: 34px;
    vertical-align: middle;
    outline: none;
}
input[type=text],
input[type=email] { width: 100%; }
textarea {
    width: 100%;
    height: 50px;
}
label {
    padding: 3px 8px 5px;
    border-radius: 2px;
    border: transparent 1px solid;    
    transition: .5s;
    &:hover {
        border: rgba(white,.2) 1px solid;        
    }
}
h3 { font: italic 1em Georgia; }
.flex-ctnr {
    display: flex;
    justify-content: space-between;
    div { margin: 0 .5%; }
}

            
          
!
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