cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

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.

              @import "compass/css3";

body {
  font: 1.25em sans-serif;
  div {
    background: #d10023;
    padding: 1em;
  &.ie10 {
    div {
      background: #50b300;
  Target IE 10 with JavaScript and CSS property detection.
  # 2013 by Tim Pietrusky
  # timpietrusky.com

 * I use "msTouchAction" as an example, but you can use
 * any of the values specified below. 
if (document.body.style.msTouchAction != undefined) {
  // Maybe a sweet class for IE 10? 
  document.body.className = 'ie10';

// IE 10 only CSS properties
var p = [

 * Test all IE 10 only CSS properties
var d = document,
    b = d.body,
    s = b.style,
    isIE10 = false;

// Test the properties
for (var i = 0; i < p.length; i++) {
  property = p[i];
  if (s[property] != undefined) {
    isIE10 = true;

if (isIE10) {
  b.className = 'ie10';
} else {
  createEl('Shame on you! This is NOT IE 10... D:<'); 

 * Just a little helper to create a DOM element
function createEl(content) {
  el = d.createElement('div'); 
  el.innerHTML = content;

 * List of IE CSS stuff:
 * https://msdn.microsoft.com/en-us/library/ie/hh869403(v=vs.85).aspx

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.


Loading ..................