css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              main(role="main")
  // An unordered list is completely useless here, 
  // but I like to use it for repeating elements.
  ul(role="progressbar", aria-busy="true", aria-label="Loading domino shop")
    li(role="presentation")
    li(role="presentation")
    li(role="presentation")
    li(role="presentation")
    li(role="presentation")
    li(role="presentation")
    li(role="presentation")
  p Designed by 
    a(href="https://dribbble.com/colder") Vitalijs Silkin 
    |  and coded by 
    a(href="https://codepen.io/Michiel/") Michiel Bijl
            
          
!
            
              $background-colour: #1a6aaf
$text-colour: #fff

// Bar Settings
$bar-colour: $text-colour
$bar-animation-duration: 2.8s

// These are not to be adjusted; it would mess 
// with the angles. If anyone knows how to make 
// the angles dynamic. I'd love to hear it.
$bar-width: 3px
$bar-height: 25px
$bar-count: 7

// Generated settings
$bar-animation-duration-single: -($bar-animation-duration / $bar-count)

[role="progressbar"]
  position: relative
  padding: 0
  width: 100px
  height: $bar-height
  list-style: none
  
  li
    display: block
    position: absolute
    right: 0
    width: $bar-width
    height: $bar-height
    border-radius: 1px
    // Rotate from the middle of the bottom
    transform-origin: 50% 100%
    background-color: $bar-colour
    animation: bar linear $bar-animation-duration infinite
    // Tell the browser which properties will change in the animation
    will-change: transform
    
    // Set default states for browsers that don't support animations
    &:nth-child(1)
      transform: translateX(0) rotate(0deg)
      opacity: .2
    &:nth-child(2)
      transform: translateX(-15px) rotate(0deg)
      animation-delay: $bar-animation-duration-single
    &:nth-child(3)
      transform: translateX(-30px) rotate(0deg)
      animation-delay: ($bar-animation-duration-single * 2)
    &:nth-child(4)
      transform: translateX(-45px) rotate(10deg)
      animation-delay: ($bar-animation-duration-single * 3)
    &:nth-child(5)
      transform: translateX(-60px) rotate(40deg)
      animation-delay: ($bar-animation-duration-single * 4)
    &:nth-child(6)
      transform: translateX(-75px) rotate(62deg)
      animation-delay: ($bar-animation-duration-single * 5)
    &:nth-child(7)
      transform: translateX(-90px) rotate(72deg)
      animation-delay: ($bar-animation-duration-single * 6)
    
@keyframes bar
  0%
    transform: translateX(0) rotate(0deg)
    opacity: 0
  14.28%
    transform: translateX(-15px) rotate(0deg)
    opacity: 1
  28.56%
    transform: translateX(-30px) rotate(0deg)
    opacity: 1
  37.12%
    transform: translateX(-39px) rotate(0deg)
    opacity: 1
  42.84%
    transform: translateX(-45px) rotate(10deg)
    opacity: 1
  57.12%
    transform: translateX(-60px) rotate(40deg)
    opacity: 1
  71.4%
    transform: translateX(-75px) rotate(62deg)
    opacity: 1
  85.68%
    transform: translateX(-90px) rotate(72deg)
    opacity: 1
  100%
    transform: translateX(-105px) rotate(74deg)
    opacity: 0

// unimportant bits
html,
body
  margin: 0
  padding: 0
  height: 100%

body
  display: flex
  align-items: center
  justify-content: center
  -webkit-font-smoothing: antialiased
  background-color: $background-colour

a
  display: inline-block
  color: $text-colour
  text-decoration: none
  border-bottom: 1px dashed rgba(255,255,255,.3)
  transition: border-color ease-out .15s
  
  &:focus,
  &:hover
    border-bottom-color: $text-colour

p
  margin-top: 40px
  color: $text-colour
  font-size: 14px
  font-family: Avenir Next, Helvetica Neue, Helvetica, sans-serif

[role="progressbar"]
  margin: 0 auto
            
          
!
            
              // https://dribbble.com/shots/1684214-Domino-effect-loader?list=219798-Loaders
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console