Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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

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.

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="container">
  <div class="circle circle-1"></div>
  <div class="circle circle-2"></div>
  <div class="circle circle-3"></div>
  <div class="circle circle-4"></div>
  <div class="circle circle-5"></div>
  <div class="circle circle-6"></div>
  <div class="circle circle-7"></div>
  <div class="circle circle-8"></div>
  <div class="circle circle-9"></div>

</div>
              
            
!

CSS

              
                $time: 2s;
$time1: .1s;
$time2: .35s;
$time3: .55s;
$time4: .75s;
$time5: .95s;
$time6: 1.15s;
$time7: 1.35s;
$time8: 1.55s;

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #475C6C;
}

.container {
  position: relative;
  // background-color: yellow;
  height: 325px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.circle {
  position: absolute;
  top: 50%;
  height: 15px;
  width: 15px;
  background-color: white;
  border-radius: 50%;
  &-1 {
    transform: translate(0, -100px);
    animation: circle-1 $time alternate linear infinite;
  }
  &-2 {
    transform: translate(40px, -90px);
    animation: circle-2 $time $time2 alternate linear infinite;
  }
  &-3 {
    transform: translate(70px, -70px);
    animation: circle-3 $time $time3 alternate linear infinite;
  }
  &-4 {
    transform: translate(90px, -40px);
    animation: circle-4 $time $time4 alternate linear infinite;
  }
  &-5 {
    transform: translate(100px, 0);
    animation: circle-5 $time $time5 alternate linear infinite;
  }
  &-6 {
    transform: translate(90px, 40px);
    animation: circle-6 $time $time6 alternate linear infinite;
  }
  &-7 {
    transform: translate(70px, 70px);
    animation: circle-7 $time $time7 alternate linear infinite;
  }
  &-8 {
    transform: translate(40px, 90px);
    animation: circle-8 $time $time8 alternate linear infinite;
  }
  &-9 {
    // background-color: pink;
    // height: 200px;
    // width: 200px;
    left: 50%;
    top: 50%;
transform: translate(-45%, -45%);
    opacity: .0;
  }
}

@function makeAnimation($name) {
  @return $name 2s alternate linear
}

@mixin fake-spin($first, $second, $third, $fourth) {
  0% { 
    transform: translate($first, $second);
  }
  100% {
    transform: translate($third, $fourth);
  }
}

@mixin spin-move($name, $first, $second) {
  @keyframes $name {
    @include fake-spin($first, $second);
  }  
}

@keyframes circle-1 {
  @include fake-spin(0, -100px, 0, 100px);
}

@keyframes circle-2 {
  // 40px, -90px
  @include fake-spin(40px, -90px, -40px, 90px);
}

@keyframes circle-3 { // 70px, -70px
  @include fake-spin(70px, -70px, -70px, 70px);
}

@keyframes circle-4 { // 90px, -40px
  @include fake-spin(90px, -40px, -90px, 40px);  
}

@keyframes circle-5 { // 100px, 0
  @include fake-spin(100px, 0, -100px, 0);  
}

@keyframes circle-6 { // 90px, 40px
  @include fake-spin(90px, 40px, -90px, -40px);  
}

@keyframes circle-7 { // 70px, 70px
  @include fake-spin(70px, 70px, -70px, -70px);  
}

@keyframes circle-8 { // 40px, 90px
  @include fake-spin(40px, 90px, -40px, -90px);
}

              
            
!

JS

              
                
              
            
!
999px

Console