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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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.

            
              <h1>This is a responsive typography demo</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dictum quam gravida ultrices ultrices. Maecenas ut fermentum ex. Nunc varius mollis ex ac luctus.</p>
<p class="hidden-md highlight">This is hidden on larger displays.</p>
<p class="visible-lg highlight">This is shown only on larger displays.</p>
<p>Nullam vitae tincidunt tellus, in luctus ipsum. Nullam et fringilla justo. Donec aliquet tellus auctor magna scelerisque, ut ultrices ipsum efficitur. Praesent semper risus sit amet augue pharetra, quis fermentum elit tincidunt. Cras luctus et sem id feugiat.</p>
<h2>Heading 2 Example</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dictum quam gravida ultrices ultrices. Maecenas ut fermentum ex. Nunc varius mollis ex ac luctus. Nullam vitae tincidunt tellus, in luctus ipsum. Nullam et fringilla justo. Donec aliquet tellus auctor magna scelerisque, ut ultrices ipsum efficitur. Praesent semper risus sit amet augue pharetra, quis fermentum elit tincidunt. Cras luctus et sem id feugiat.</p>
<h3>Heading 3 Example</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dictum quam gravida ultrices ultrices. Maecenas ut fermentum ex. Nunc varius mollis ex ac luctus.</p>

<img src="http://lorempixel.com/800/400/" class="img-responsive" />

<p>Nullam vitae tincidunt tellus, in luctus ipsum. Nullam et fringilla justo. Donec aliquet tellus auctor magna scelerisque, ut ultrices ipsum efficitur. Praesent semper risus sit amet augue pharetra, quis fermentum elit tincidunt. Cras luctus et sem id feugiat.</p>
<h4>Heading 4 Example</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc dictum quam gravida ultrices ultrices. Maecenas ut fermentum ex. Nunc varius mollis ex ac luctus. Nullam vitae tincidunt tellus, in luctus ipsum. Nullam et fringilla justo. Donec aliquet tellus auctor magna scelerisque, ut ultrices ipsum efficitur. Praesent semper risus sit amet augue pharetra, quis fermentum elit tincidunt. Cras luctus et sem id feugiat.</p>
            
          
!
            
              /* Common base styles for all devices */

body {
  font-size: 14px;
  line-height: 1.57em;
  font-family: georgia
}

body:after {
  content: 'Size: Mobile below 480px';
  background: yellow;
  padding: 0.25em
}

h1 {
  font-size: 2em
}

h2 {
  font-size: 1.5em
}

h3 {
  font-size: 1.25em
}

h4,
p {
  font-size: 1em
}

.img-responsive {
  max-width: 100%;
  height: auto
}

.hidden-xs,
.visible-sm,
.visible-md,
.visible-lg {
  visibility: hidden;
  display: none
}

.highlight { 
  background-color:yellow;
}

@media only screen and (min-width: 480px) {
  /* Styles for wide mobiles (480px) and above */
  .hidden-sm {
    visibility: hidden;
    display: none
  }
  .visible-sm {
    visibility: visible;
    display: block
  }
  body:after {
    content: 'Size: Wide mobile 480px and up';
  }
}

@media only screen and (min-width: 768px) {
  /* Styles for tablets/netbooks (768px) and up */
  body {
    font-size: 16px
  }
  .hidden-md {
    visibility: hidden;
    display: none
  }
  .visible-md {
    visibility: visible;
    display: block
  }
  body:after {
    content: 'Size: Tablets 768px and up';
  }
}

@media only screen and (min-width: 1024px) {
  /* Styles for large screens (desktops 1024px) and above */
  body {
    font-size: 20px
  }
  .hidden-lg {
    visibility: hidden;
    display: none
  }
  .visible-lg {
    visibility: visible;
    display: block
  }
  body:after {
    content: 'Size: Desktop 1024 and up';
  }
}
            
          
!
999px
🕑 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 ..................

Console