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

              
                <main>
  <div class="cylinder">
    <div class="circle_cont">
      <div class="cylinder_styles" style="--n: 6">
        <div class="style cylinder" style="--i: 1"></div>
        <div class="style cylinder" style="--i: 2"></div>
        <div class="style cylinder" style="--i: 3"></div>
        <div class="style cylinder" style="--i: 4"></div>
        <div class="style cylinder" style="--i: 5"></div>
        <div class="style cylinder" style="--i: 6"></div>
      </div>
      <div class="round_styles" style="--n: 6">
        <div class="style round 1" style="--i: 4">
          <div class="bullet _1"></div>
        </div>
        <div class="style round 2" style="--i: 5">
          <div class="bullet _2"></div>
        </div>
        <div class="style round 3" style="--i: 6">
          <div class="bullet _3"></div>
        </div>
        <div class="style round 4" style="--i: 1">
          <div class="bullet _4"></div>
        </div>
        <div class="style round 5" style="--i: 2">
          <div class="bullet _5"></div>
        </div>
        <div class="style round 6" style="--i: 3">
          <div class="bullet _6"></div>
        </div>
      </div>
      <div class="center style">
        <div class="middle"></div>
      </div>
    </div>
  </div>
</main>
              
            
!

CSS

              
                $background: #303030;
$primary: #e28743;
$secondary: #fff8d6;
* {
  margin: 0;
  padding: 0;
}
main {
  background: $background;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.style {
  position: absolute;
  margin: -1em;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  --az: calc(var(--i) * 1turn / var(--n));
  background: $background;
  font: 2em/2 trebuchet ms, sans-serif;
  text-align: center;
  counter-reset: i var(--i);

  &.cylinder {
    transform: rotate(var(--az)) translate(4.7em) rotate(calc(-1 * var(--az)));
  }

  &.round {
    transform: rotate(var(--az)) translate(3em)
      rotate(calc(-1 * var(--az) - 30deg));
  }

  &.center {
    top: 50%;
    left: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
.circle_cont {
  background-color: $primary;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  animation: rotate 5.5s cubic-bezier(0.1, 0.5, 0.4, 1) infinite;
}
.cylinder_styles {
  position: relative;
  top: 50%;
  left: 50%;
}
.round_styles {
  position: relative;
  top: 75%;
  left: 44%;
  transform: rotate(30deg);
}
.middle {
  width: 1.5em;
  height: 1.5em;
  background: black;
  border-radius: 50%;
}
.bullet {
  background: $secondary;
  z-index: 5;
  backdrop-filter: blur(1.5rem);
  width: 1.9em;
  height: 1.9em;
  border-radius: 50%;
  margin: 1.5px;
  &._1 {
    animation: cycle 5.5s infinite;
  }
  &._2 {
    animation: cycle2 5.5s infinite;
  }
  &._3 {
    animation: cycle3 5.5s infinite;
  }
  &._4 {
    animation: cycle4 5.5s infinite;
  }
  &._5 {
    animation: cycle5 5.5s infinite;
  }
  &._6 {
    animation: cycle6 5.5s infinite;
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  14% {
    transform: rotate(60deg);
  }
  28% {
    transform: rotate(120deg);
  }
  42% {
    transform: rotate(180deg);
  }
  56% {
    transform: rotate(240deg);
  }
  70% {
    transform: rotate(300deg);
  }
  84% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
@keyframes cycle {
  2% {
    opacity: 100;
  }
  5% {
    opacity: 0;
  }
  85% {
    opacity: 0;
  }
  86% {
    opacity: 100;
  }
}
@keyframes cycle2 {
  70% {
    opacity: 100;
  }
  75% {
    opacity: 0;
  }
  87% {
    opacity: 0;
  }
  88% {
    opacity: 100;
  }
}
@keyframes cycle3 {
  55% {
    opacity: 100;
  }
  60% {
    opacity: 0;
  }
  88% {
    opacity: 0;
  }
  89% {
    opacity: 100;
  }
}
@keyframes cycle4 {
  40% {
    opacity: 100;
  }
  45% {
    opacity: 0;
  }
  89% {
    opacity: 0;
  }
  90% {
    opacity: 100;
  }
}
@keyframes cycle5 {
  27% {
    opacity: 100;
  }
  32% {
    opacity: 0;
  }
  91% {
    opacity: 0;
  }
  92% {
    opacity: 100;
  }
}
@keyframes cycle6 {
  15% {
    opacity: 100;
  }
  20% {
    opacity: 0;
  }
  93% {
    opacity: 0;
  }
  94% {
    opacity: 100;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console