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.

              <!-- :read-only -->
<section class="example-cntr read-only">
    <h1>CSS <code>:read-only</code> pseudo-class</h1>
    <p>The <code>:read-only</code> pseudo-class targets an element that cannot be editable by the user. This pseudo-class is very similar to the <code>:disabled</code> pseudo-class, it all depends on which attribute is used in the markup that would tell
        us which pseudo-class to use.</p>
    <p>This is useful for example in situations where we need to show prepopulated information on a form that cannot be altered but that still needs to be displayed in form elements for submission purposes.</p>
    <p>In the following example, this input has the <code>readonly</code> HTML attribute, so it will have gray text, and thus we can target it with the <code>:read-only</code> pseudo-class.</p>
        <span>Are you read-only?</span>
        <input type="text" value="Yep! I am read only" readonly>
.read-only {    
    input[type=text] {
        box-sizing: content-box;
        width: 200px;
        padding: 0 5px;
        border: #666 2px solid;
        border-radius: 2px;
        box-shadow: inset 0 -1px 0 #fff, inset -1px 0 0 #fff;
        cursor: text;
        transition: .5s;
    input[type=text]:read-only {
        color: #555;
        text-shadow: 0px -1px 0 #f9f9f9;
        background: #cdcdcd;
    label { display: inline-block; }
    span {
        display: block;
        margin-bottom: 5px;

//Styling stuff not needed for demo
body {
    text-align: left;
    line-height: 1.5;
h1 {
    font-size: 22px;
    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; }

input {
    width: 30px; height: 30px;
    vertical-align: middle;
    outline: none;
input, label { cursor: pointer; }
input[type=email] { width: 100%; }

label {
    padding: 3px 8px 5px;
    border-radius: 2px;
    border: transparent 1px solid;    
    transition: .5s;
    &:hover {
        border: rgba(white,.2) 1px solid;        
.example-cntr {
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 30px;
    box-shadow: 0 1px 2px rgba(black,.3);
    background: rgba(black,.15);
🕑 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 ..................