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="container">
  <div class="post">
    <p>This can be used instead of line break. It's fun and looks similar to gmail loading bar.</p>

  <div class="box">
    <div class="box-sm red"></div>
    <div class="box-sm orange"></div>
    <div class="box-sm yellow "></div>
    <div class="box-sm green "></div>
    <div class="box-sm blue "></div>
    <div class="box-sm purple"></div>


                * {
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
  color: #fff;

body {
  margin: 0;
  background: #5D4157;
  background: -webkit-linear-gradient(to bottom, #5D4157, #A8CABA);
  background: linear-gradient(to bottom, #274046, #A8CABA);

.box {
  display: flex;
  width: 100%;
  height: 8px;
  margin: 5px 0px 60px 0px;

.box-sm {
  height: 8px;
  margin: 0;
  flex-grow: 1;
  transition: all .8s ease-in-out;
  cursor: pointer;

// Growing the width of box, when hover using flex-grow property
.box-sm:hover {
  flex-grow: 12;

.post {
  display: flex;
  flex-direction: column;
  align-items: center;

.container {
  background: #424242;
  height: 100%;
  margin: 20px;
  padding: 20px;
  outline: 1px dashed #98abb9;
  outline-offset: -5px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 2px 2px rgba(0, 0, 0, .2), 0 4px 4px rgba(0, 0, 0, .1), 0 0 8px rgba(0, 0, 0, .1);

.post {
  margin-bottom: 50px;
  p {
    text-align: center;
    margin-bottom: 0px;
  h2 {
    font-size: 60px;
    color: #E0E0E0;
    text-shadow: 0px 1px 1px black;

.red {
  background-color: #FF5852;

.orange {
  background-color: #FF9000;

.yellow {
  background-color: #FFD300;

.green {
  background-color: #3DCD49;

.blue {
  background-color: #0089D7;

.purple {
  background-color: #9E44C4;