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

              
                .cards(data-active=3, data-current=3)
  .card
    .card__sibebar
      h2 Basic level
    .card__body
      ul
        li HTML/CSS/JavaScript
        li Internet basics
        li Dev tools basics
      a(href="#more") See more ⇝
      span Next card ⇝
  .card
    .card__sibebar
      h2 Intermediate level
    .card__body
      ul
        li Pug/Sass/ES6
        li WordPress
        li Git
      a(href="#more") See more ⇝
      span Next card ⇝
  .card
    .card__sibebar
      h2 Advanced level
    .card__body
      ul
        li Performance 
        li Accessibility 
        li JAMstack
      a(href="#more") See more ⇝
      span Next card ⇝
              
            
!

CSS

              
                :root {
  --color-alpha: #FF3366;
  --color-beta: #12E09F;
  --color-gamma: #FAC2D4;
  --color-delta: #C2FAE8;
  --color-chi: #120207;
  --color-psi: #F7F8F8;
  --color-omega: #fff;
}

html {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
  
  @media (max-width: 800px) {
    font-size: 14px;
  } 
}

.cards {
  position: relative;
  display: flex;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 4rem 4rem 0;
  padding: .5rem 2rem 1.5rem 1rem;
  border-radius: .2rem;
  background-color: var(--color-beta);
  border: 1px dotted var(--color-chi);
  position: relative;
  min-width: 13rem;
  min-height: 18rem;
  transform: translate(-1.5rem, -100%) skewX(-1deg);
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1), background-color .5s cubic-bezier(0.64, 0, 0.78, 0);
  max-width: calc(100vww - 4rem);
  z-index: 1;
  
  h2 {
    color: var(--color-chi);
  }
  
  ul {
    font-family: sans-serif;
    padding-left: 1em;
    margin: 1em 0;
  }
  
  li {
    font-size: 0.875rem;
    margin: .5em 0;
  }
  
  a {
    display: block;
    color: var(--color-chi);
    text-decoration: none;
    margin-top: 3rem;
    
    :hover,
    :focus,
    :active {
      text-decoration: none;
    }
  }
  
  span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: block;
    text-align: center;
    font-size: 1rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  [data-active="1"] &:not(:nth-of-type(1)),
  [data-active="2"] &:not(:nth-of-type(2)),
  [data-active="3"] &:not(:nth-of-type(3)) {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: var(--color-alpha);
  }
  
  [data-active="1"] &:nth-of-type(1),
  [data-active="2"] &:nth-of-type(2),
  [data-active="3"] &:nth-of-type(3) {
    z-index: 0;
    transform: none;
  }
  
  [data-active="1"] & {
    &:nth-of-type(2) {
      transform: translate(2rem, 2rem);
      z-index: -1;
    }
  }
  
  [data-current="1"] & {
    &:nth-of-type(3) {
      transform: translate(4rem, 4rem);
      z-index: -2;
    }
  }
  
  [data-active="2"] & {
    &:nth-of-type(3) {
      transform: translate(2rem, 2rem);
      z-index: -1;
    }
  }
  
  [data-current="2"] & {
    &:nth-of-type(1) {
      transform: translate(4rem, 4rem);
      z-index: -2;
    }
  }
  
  [data-active="3"] & {
    &:nth-of-type(1) {
      transform: translate(2rem, 2rem);
      z-index: -1;
    }
  } 

  [data-current="3"] & {
    &:nth-of-type(2) {
      transform: translate(4rem, 4rem);
      z-index: -2;
    }
  }
}

@keyframes shuffle1 {
  73.33%,
  100% {
    transform: none;
    z-index: 0;
  }
  3.33% {
    transform: translate(-1.5rem, -100%) skewX(-1deg);    
    z-index: 1;
  }
  6.66%,
  36.66% {
    transform: translate(4rem, 4rem);
    z-index: -2;  
  }
  40%,
  70% {
    transform: translate(2rem, 2rem);
    z-index: -1;  
  }
}

@keyframes shuffle2 {
  6.66%,
  36.66% {
    transform: none;
    z-index: 0;
  }
  36.66% {
    transform: translate(-1.5rem, -100%) skewX(-1deg);    
    z-index: 1;
  }
  40%,
  70% {
    transform: translate(4rem, 4rem);
    z-index: -2;  
  }
  73.33%,
  100%,
  0%,
  3.33% {
    transform: translate(2rem, 2rem);
    z-index: -1;  
  }
}

@keyframes shuffle3 {
  33.33%, 
  63.33% {
    transform: none;
    z-index: 0;
  }
  63.33% {
    transform: translate(-1.5rem, -100%) skewX(-1deg);    
    z-index: 1;
  }
  66.66%,
  96.66% {
    transform: translate(4rem, 4rem);
    z-index: -2;  
  }
  100%,
  30% {
    transform: translate(2rem, 2rem);
    z-index: -1;  
  }
}
              
            
!

JS

              
                const $cards = document.querySelector('.cards');

if($cards) {
  let i = 0;
  setInterval(() => {
    const active = i++ % 3 + 1;
    $cards.setAttribute('data-active', active);
    $cards.removeAttribute('data-current');
    setTimeout(() => {
      $cards.setAttribute('data-current', active);
    }, 1000)
  }, 5000);
}
              
            
!
999px

Console