Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <h1>Hover over the space below</h1>

<div class="circle">

  <img src="" />

  <div class="mask-top-container">
    <div class="mask-top"></div>
  <div class="mask-bottom-container">
    <div class="mask-bottom"></div>


<p>Above this though. It's in the middle.</p>


                @import "compass/css3";

$diameter      : 250px; // include units, do not use %
$border        : 10px;  // include units
$border-color  : hsl(200, 100, 50);
$bg-color      : hsl(200, 50, 10);
$anim-duration : 500ms;
$anim-easing   : ease-in-out;

@import url(,400);

body {
  background: $bg-color;
  font-family: Lato, sans-serif;
  color: hsl(200, 100, 100);
  text-align: center;

.circle {
  position: relative;
  width: $diameter;
  height: $diameter;
  margin: 40px auto;
  img {
    width: 100%;
    height: 100%;
    border: $border solid $border-color;
    border-radius: 50%;
    @include box-sizing(border-box);

  // Notice the pixel fudging below. Trying to hide subpixel junk from animation. There are still issues below ~50px in Chrome.

  .mask-top-container, .mask-bottom-container {
    position: absolute;
    top: -1px;
    left: -1px;
    width: 101%;
    height: 51%;
    overflow: hidden;

  .mask-bottom-container { top: 50%; }
  .mask-top, .mask-bottom {
    width: 100%;
    height: 100%;
    background: $bg-color ;
    @include transition(all $anim-duration $anim-easing);
    @include transform-origin(50%, 100%);
    -webkit-backface-visibility: hidden;

  .mask-bottom { @include transform-origin(50%, 0%); }

  &:hover {
    .mask-top    { @include transform(rotate(180deg)); }
    .mask-bottom { @include transform(rotate(-180deg)); }

h1 {
  font: 100 40px Lato, sans-serif;
  color: hsl(200, 100, 85);
  text-align: center;
  letter-spacing: 5px;