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.


                <div class="square">
    <div class="left"></div>
    <div class="center"></div>
    <div class="right"></div>


                /* children will be positioned relativly to this element */
.square {
    position: relative;
    height: 100px;

.right {
    position: absolute;
    top: 0;
    bottom: 0;
		background: #222;

/* we need room for a 20 pixel border radius (on one side) */
.right { width: 20px }

.left { border-radius: 20px 0 0 20px }
.right { border-radius: 0 20px 20px 0 }

/* child layout definitions */
.center {
    /* center needs to be 20 pixels from the left, 
    so it doesn't overlap with the .left element */
    left: 20px;

    /* needs a width of 1 pixel, this causes 
    scaleX(60) is equal to 60 pixels */
    width: 1px;
    transform: scaleX(60);

    /* we need to scale the texture from the left side 
    for it to align correctly, default is center */
    transform-origin: left;

.right {
    /* we need to move the right element to align with
    the right side of the .center element 
    20px + 60px = 80px */
    transform: translateX(80px);

.center {
    animation: center-animate 1s ease infinite alternate;

.right {
    animation: right-animate 1s ease infinite alternate;

@keyframes right-animate {
    0% { transform: translateX(140px) }
    100% { transform: translateX(20px) }

@keyframes center-animate {
    0% { transform: scaleX(121) }
    100% { transform: scaleX(1) }

/* center */
.square {
	position: absolute;
	left: calc(50% - 80px);
	top: calc(50% - 50px);