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.

            
              <p>The boxes <em>should</em> have the styles listed inside applied. Only listing the browsers I or others have actually tested in.</p>

<p>Works in <strong>Chrome 36-37</strong> (Windows 8) and <strong>Safari 7.1-8</strong> (OSX 10.9.5/ OSX Yosemite - see <a href='https://twitter.com/thebabydino/status/536161529184681984' target='_blank'>answers here</a>) for <em>everything not using angle units</em>.</p>

<p>Works for <em>everything</em> in <strong>Chrome 38+/ Opera 25+</strong> (Windows 8).</p>

<p>Works in <strong>Firefox 31-Firefox 36</strong> (Windows 8) <em>only for length units and percentages</em>. See <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=984021"target="_blank">bug 984021</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=956573"target="_blank">bug 956573</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=594933"target="_blank">bug 594933</a>.</p>

<p><em>None</em> of these works in <strong>IE11</strong> (Windows 8). See <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/653501/" target="_blank">this</a>.</p>

  
<div class='tests'>
  <div class='box'>background: rgb(0, calc(150 + 105), 0);</div>
  <div class='box'>background: hsl(calc(150 - 105), 100%, 50%);</div>
  <div class='box'>background: rgba(0, 255, 0, calc(.3 * 2));</div>
  <div class='box'>background: hsla(100, 100%, calc(51% / 3), .5);</div>
  <div class='box'>transform: translate(calc(45px + 27vmin), 3em);</div>
  <div class='box'>transform: scale(.5, calc(.8 / 4));</div>
  <div class='box'>transform: rotate(calc(45deg + 1.7327rad));</div>
  <div class='box'>transform: skew(calc(.5turn - 14grad));</div>
  <div class='box'>transform: rotateX(calc(.25turn - 13deg));</div>
  <div class='box'>transform: translateZ(calc(3em - 20vh));</div>
  <div class='box'>transform: rotate3d(0, .6, calc(-.6 - .2), 45deg);</div>
  <div class='box'>transform: matrix(1, calc(.6 / -3), 0, 1, 0, 0);</div>
  <div class='box'>transform: rotate3d(-1, 0, 0, calc(45deg - 2.31rad));</div>
</div>
            
          
!
            
              .tests {
  overflow: hidden;
  perspective: 25em;
}
.box {
  float: left;
  outline: solid .125em;
  margin: .5em .25em;
  width: 35em; height: 8em;
  font: 1em/8 monospace;
  text-align: center;
}

.box:nth-child(1) {
  background: rgb(0, calc(150 + 105), 0);
}
.box:nth-child(2) {
  background: hsl(calc(150 - 105), 100%, 50%);
}
.box:nth-child(3) {
  background: rgba(0, 255, 0, calc(.3 * 2));
}
.box:nth-child(4) {
  background: hsla(100, 100%, calc(51% / 3), .5);
}
.box:nth-child(5) {
  transform: translate(calc(45px + 27vmin), 3em);
}
.box:nth-child(6) {
  transform: scale(.5, calc(.8 / 4));
}
.box:nth-child(7) {
  transform: rotate(calc(45deg + 1.7327rad));
}
.box:nth-child(8) {
  transform: skewX(calc(.5turn - 14grad));
}
.box:nth-child(9) {
  transform: rotateX(calc(.25turn - 13deg));
}
.box:nth-child(10) {
  transform: translateZ(calc(3em - 20vh));
}
.box:nth-child(11) {
  transform: rotate3d(0, .6, calc(-.6 - .2), 45deg);
}
.box:nth-child(12) {
  transform: matrix(1, calc(.6 / -3), 0, 1, 0, 0);
}
.box:nth-child(13) {
  transform: rotate3d(-1, 0, 0, calc(45deg - 2.31rad));
}
            
          
!
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