Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div class="example">
  <div class="dot"></div>
</div>
              
            
!

CSS

              
                .example {
  position:relative;
  margin:150px auto;
  width:50px;
  height:50px;
}
.dot:before{
  content:' ';
  position: absolute;
  z-index:2;
  left:0;
  top:0;
  width:10px;
  height:10px; 
  background-color: #ff4200;
  border-radius: 50%;
}

.dot:after {
  content:' ';
  position: absolute;
  z-index:1;
  width:10px;
  height:10px; 
  background-color: #ff4200;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,0,0,.3) inset;
  -webkit-animation-name:'ripple';/*动画属性名,也就是我们前面keyframes定义的动画名*/
  -webkit-animation-duration: 1s;/*动画持续时间*/
  -webkit-animation-timing-function: ease; /*动画频率,和transition-timing-function是一样的*/
  -webkit-animation-delay: 0s;/*动画延迟时间*/
  -webkit-animation-iteration-count: infinite;/*定义循环资料,infinite为无限次*/
  -webkit-animation-direction: normal;/*定义动画方式*/
}

@keyframes ripple {
   0% {
    left:5px;
    top:5px;
    opcity:75;
    width:0;
    height:0;
  }
  100% {
    left:-20px;
    top:-20px;
    opacity: 0;
    width:50px;
    height:50px;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console