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>
  <div class="jsconf-asia">
  <div class="js">
    <svg viewBox="0 0 178 292">
    <path fill-rule="nonzero" d="M.65 237.474l48.212-29.178c9.302 16.492 17.763 30.444 38.058 30.444 19.454 0 31.72-7.61 31.72-37.21V.23h59.203v202.138c0 61.32-35.944 89.23-88.385 89.23-47.362 0-74.853-24.528-88.808-54.13"/>
  </svg>
    <svg class="flicker" viewBox="0 0 206 296">
    <path class="light" fill-rule="nonzero" d="M48.206 207.22c12.69 20.722 29.183 35.946 58.36 35.946 24.533 0 40.175-12.264 40.175-29.18 0-20.3-16.067-27.49-43.134-39.327l-14.797-6.35c-42.716-18.18-71.05-41.016-71.05-89.226C17.76 34.68 51.59.846 104.453.846c37.637 0 64.702 13.111 84.154 47.367l-46.097 29.6c-10.15-18.182-21.14-25.37-38.056-25.37-17.34 0-28.335 10.995-28.335 25.37 0 17.763 10.995 24.953 36.366 35.95l14.8 6.342c50.325 21.57 78.66 43.557 78.66 93.034 0 53.286-41.866 82.464-98.11 82.464-54.976 0-90.5-26.218-107.836-60.474l48.206-27.91z"/>
  </svg>
  </div>
  <div class="background">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</div>
</main>
            
          
!
            
              $colours: (#56aaeb, #256bc4, #9ae0ff, #021c7f, #256bc3, #ffed2a);

html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

.jsconf-asia {
  background-color: black;
  margin: 0 auto;
  height: 100vmin;
  width: 100vmin;
  border-radius: 1vmin;
  position: relative;
}

.background {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;

  @each $colour in $colours {
    $i: index($colours, $colour);
    div:nth-child(#{$i}) {
      border: 1vmin solid $colour;
      border-radius: 1vmin;
      box-shadow: 0 0 1vmin $colour,
        inset 0 0 1vmin $colour,
        0 0 2vmin $colour,
        inset 0 0 2vmin $colour,
        0 0 3vmin $colour,
        inset 0 0 3vmin $colour;
    }
  }
  
  div {
    height: 100vmin;
    float: left;
    margin-right: 2vmin;
  }
  
  div:first-child {
    width: 10vmin;
  }
  
  div:nth-child(2) {
    width: 19vmin;
  }
  
  div:nth-child(3) {
    width: 4vmin;
  }
  
  div:nth-child(4) {
    width: 28vmin;
  }
  
  div:nth-child(5) {
    width: 10vmin;
  }
  
  div:nth-child(6) {
    width: 19vmin;
    margin-right: 0;
  }
}

.js {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

svg {
  height: 46.0317vmin;
  
  path {
    fill: white;
  }
}

svg:first-child,
svg:nth-child(2) {
  position: absolute;
  bottom: 7.9365vmin;
}

svg:first-child {
  left: 26.1905vmin;
  width: 28.5714vmin;
}

svg:nth-child(2) {
  right: 7.9365vmin;
  width: 32.5397vmin;
}

@supports (filter: drop-shadow(0 0 1vmin gray)) {
  svg {
    filter: drop-shadow(0 0 1vmin gray)
      drop-shadow(0 0 2vmin white)
      drop-shadow(0 0 3vmin white);
  }
  
  .flicker {
    animation: flicker 10s infinite;
  }

  .light {
    animation: light 10s infinite;
  }
}

@supports (display: grid) and (not(display: -ms-grid)) {
  .background {
    display: grid;
    grid-template-rows: 100vmin;
    grid-template-columns: 10vmin 19vmin 4vmin 28vmin 10vmin 19vmin;
    grid-gap: 2vmin;
    
    div {
      float: initial;
      height: initial;
      margin: initial;
    }
    
    @for $i from 1 through 6 {
      div:nth-child(#{$i}) {
        width: initial;
      }
    }
  }

  .js {
    display: grid;
    grid-template-rows: calc(29000vmin / 630)
      calc(29000vmin / 630)
      calc(5000vmin / 630);
    grid-template-columns: calc(16500vmin / 630)
      calc(18000vmin / 630)
      calc(3000vmin / 630)
      calc(20500vmin / 630)
      calc(5000vmin / 630);
  }
  
  svg {
    max-width: 100%;
  }
  
  svg:first-child,
  svg:nth-child(2) {
    position: initial;
    height: initial;
    width: initial;
  }

  svg:first-child {
    grid-row: 2;
    grid-column: 2 / 3;
  }

  svg:nth-child(2) {
    grid-row: 2;
    grid-column: 4 / 5;
  }
}

@keyframes flicker {
  21%, 39%, 45%, 47% {
    filter: none;
  }
  18%, 26%, 38%, 40%, 44%, 46%, 48% {
    filter: drop-shadow(0 0 1vmin gray)
      drop-shadow(0 0 2vmin white)
      drop-shadow(0 0 3vmin white);
  }
}

@keyframes light {
  21%, 39%, 45%, 47% {
    fill: gray;
  }
  18%, 26%, 38%, 40%, 44%, 46%, 48% {
    fill: white;
  }
}

@supports not (width: 100vmin) {
  main::before {
    content: '';
    display: block;
    background: url('') no-repeat center;
  }
}
            
          
!
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