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

              
                <div class="weather weather--sun">
  <div class="icon">
    <div class="icon__sun">
      <div class="icon__sun-lights">
      <div class="icon__sun-light"></div>
      <div class="icon__sun-light"></div>
      <div class="icon__sun-light"></div>
      <div class="icon__sun-light"></div>
      <div class="icon__sun-light"></div>
      <div class="icon__sun-light"></div>
      <div class="icon__sun-light"></div>
      <div class="icon__sun-light"></div>
      </div>
    </div>   
    <div class="icon__cloud">
      <div class="icon__cloud-reflect icon__cloud-reflect--1">    
      </div>
      <div class="icon__cloud-reflect icon__cloud-reflect--2">   
      </div>  
       <svg  class="icon__cloud-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewbox="0 0 200 500" width="50%"  ><clipPath id="cloud-path"><path d=" M 146.5 293 C 65.644 293 0 227.356 0 146.5 C 0 65.644 65.644 0 146.5 0 C 205.641 0 256.643 35.12 279.772 85.624 C 293.416 79.445 308.559 76 324.5 76 C 384.383 76 433 124.617 433 184.5 C 433 244.383 384.383 293 324.5 293 L 324.5 293 C 324.5 293 324.5 293 324.5 293 L 146.5 293 Z " fill="currentColor"/></clipPath></svg>
    </div>
    <div class="icon__cloud-shadow">
    </div>
  </div>
</div>
<div class="weather weather--thunder">
  <div class="icon">
    <div class="icon__rain">
      <div class="icon__rain-drops"></div>
    </div>   
    <div class="icon__thunder">
    </div>   
    <div class="icon__cloud">
      <div class="icon__cloud-reflect icon__cloud-reflect--1">    
      </div>
      <div class="icon__cloud-reflect icon__cloud-reflect--2">   
      </div>  
       <svg  class="icon__cloud-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewbox="0 0 200 500" width="50%"  ><clipPath id="cloud-path"><path d=" M 146.5 293 C 65.644 293 0 227.356 0 146.5 C 0 65.644 65.644 0 146.5 0 C 205.641 0 256.643 35.12 279.772 85.624 C 293.416 79.445 308.559 76 324.5 76 C 384.383 76 433 124.617 433 184.5 C 433 244.383 384.383 293 324.5 293 L 324.5 293 C 324.5 293 324.5 293 324.5 293 L 146.5 293 Z " fill="currentColor"/></clipPath></svg>
    </div>
    <div class="icon__cloud-shadow">
    </div>
  </div>
</div>
<div class="weather weather--snow">
  <div class="icon">
    <div class="icon__snow">
      <div class="icon__snow-flakes"></div>
    </div>   
    <div class="icon__cloud">
      <div class="icon__cloud-reflect icon__cloud-reflect--1">    
      </div>
      <div class="icon__cloud-reflect icon__cloud-reflect--2">   
      </div>  
       <svg  class="icon__cloud-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewbox="0 0 200 500" width="50%"  ><clipPath id="cloud-path"><path d=" M 146.5 293 C 65.644 293 0 227.356 0 146.5 C 0 65.644 65.644 0 146.5 0 C 205.641 0 256.643 35.12 279.772 85.624 C 293.416 79.445 308.559 76 324.5 76 C 384.383 76 433 124.617 433 184.5 C 433 244.383 384.383 293 324.5 293 L 324.5 293 C 324.5 293 324.5 293 324.5 293 L 146.5 293 Z " fill="currentColor"/></clipPath></svg>
    </div>
    <div class="icon__cloud-shadow">
    </div>
  </div>
</div>
<div class="weather weather--rainbow">
  <div class="icon">
    <div class="icon__rainbow">
        <div class="icon__rainbow-arc"></div>
        <div class="icon__rainbow-arc"></div>
        <div class="icon__rainbow-arc"></div>
        <div class="icon__rainbow-arc"></div>
        <div class="icon__rainbow-arc"></div>
        <div class="icon__rainbow-arc"></div>
        <div class="icon__rainbow-arc"></div>
    </div>   
    <div class="icon__cloud">
      <div class="icon__cloud-reflect icon__cloud-reflect--1">    
      </div>
      <div class="icon__cloud-reflect icon__cloud-reflect--2">   
      </div>  
       <svg  class="icon__cloud-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewbox="0 0 200 500" width="50%"  ><clipPath id="cloud-path"><path d=" M 146.5 293 C 65.644 293 0 227.356 0 146.5 C 0 65.644 65.644 0 146.5 0 C 205.641 0 256.643 35.12 279.772 85.624 C 293.416 79.445 308.559 76 324.5 76 C 384.383 76 433 124.617 433 184.5 C 433 244.383 384.383 293 324.5 293 L 324.5 293 C 324.5 293 324.5 293 324.5 293 L 146.5 293 Z " fill="currentColor"/></clipPath></svg>
    </div>
    <div class="icon__cloud-shadow">
    </div>
  </div>
</div>
              
            
!

CSS

              
                html,body{
  height: 100%;
  margin: 0;
  overflow: hidden;
}
@keyframes rotation {
  100% {
    transform: rotate(1turn);
  }
}
@keyframes snow {
  0% {
    transform: translateY(-12rem) rotate(45deg);
  }
  50%, 100% {
    transform: translateY(12rem) rotate(45deg);
  }
}

@keyframes thunder {
  0%,25%,75%,100% {
    filter: drop-shadow(0px -1px 0px #cfb8e5) drop-shadow(0px 0px 0px #9a4ee7)  drop-shadow(0px 0px 0px rgba(#9a4ee7,30%)) drop-shadow(-2px -2px 1px #3c3762) drop-shadow(4px 1px 1px #3c3762)
  }
  50% {
    filter: drop-shadow(0px -1px 0px #cfb8e5) drop-shadow(0px 0px 3px #9a4ee7) drop-shadow(0px 0px 30px rgba(#9a4ee7,30%)) drop-shadow(-2px -2px 1px #3c3762) drop-shadow(4px 1px 1px #3c3762);
  }
}

@keyframes floating {
  0%, 100%{
    transform: translatey(0)
  }
  50%{
    transform: translatey(1rem)
  }
}

@keyframes pulse {
  0%, 100%{
    transform: scale(1)
  }
  50%{
    transform: scale(0.9)
  }
}

@keyframes neon {
  0%,40%,60%, 100%{    
    filter: brightness(1);
}
  50%{    
    filter: brightness(0.9);
  }
}


body{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-column-gap: 0px;
  grid-row-gap: 0px;
}
.weather{
  display: flex;
  align-items:center;
  justify-content: center;
  overflow: hidden;
  &--sun{
  background: linear-gradient(45deg, #628aa4, #77a1b8);
  }
  &--thunder{
  background: linear-gradient(45deg, #172a44, #1f3654);
  }
  &--snow{
  background: linear-gradient(45deg, #5e6270, #82889c);
  }
  &--rainbow{
  background: linear-gradient(45deg, #1d5476, #296b8f);    
  }
}
.icon{
  position:relative;
      width: 18rem;
    height: 13rem;
      transform: scale(0.8);
  &__rainbow{
    position: absolute;
    right: 0rem;
    top: -2rem;
    height: 14rem;
    width: 14rem;
    filter: drop-shadow(0px 0px 10px rgba(255,255,255,0.2));
    animation: pulse 4s infinite;
    &-arc{
      position: absolute;
      inset:0;
      border-radius:50%;
      color:red;
      box-shadow: inset 2.5rem 2rem 0.3rem -3rem #000000bf, inset 0 0 0.3rem 0.25rem #ffffffb8, inset 0 0 0.2rem 0.4rem #000000a6, inset 0 0 0 0.6rem;
      animation: neon 4s infinite;
      &:nth-child(1){
        color: #ff1f5d; 
      }
      &:nth-child(2){
        color:#eb8125; 
        inset: 0.9rem;
        animation-delay: 0.2s;
      }
      &:nth-child(3){
        color:#fbff0e; 
        inset: 1.8rem;
        animation-delay: 0.4s;
      }
      &:nth-child(4){
        color:#a8ef3c; 
        inset: 2.7rem;
        animation-delay: 0.6s;
      }
      &:nth-child(5){
        color:#59d9ff; 
        inset: 3.6rem;
        animation-delay: 0.8s;
      }
      &:nth-child(6){
        color:#6685f5; 
        inset: 4.5rem;
        animation-delay: 1s;
      }
      &:nth-child(7){
        color:#6a38e1; 
        inset: 5.4rem;
        animation-delay: 1.2s;
      }
    }
  }
  &__snow{
    position: absolute;
    top: 12.8rem;
    left:0;
    width: 100%;
    height: 10rem;
    overflow:hidden;
    &-flakes{      
      position: absolute;
      top:0;
      left: 13rem;
      height: 0.8rem;
      width: 0.8rem;
      background: #fff;
      animation: snow 3s linear infinite;
      transform: translateY(-12rem) rotate(45deg);
      opacity:0.5;
      color: #fff;
      box-shadow: 1rem 2rem, 1rem 7rem, 4rem 8rem, -5rem 8rem, -2rem 4rem, 0rem 11rem, 4rem 5rem, -2rem 8rem, 4rem 3rem 0 -0.1rem, 0rem 5rem 0 -0.1rem, -4rem 5rem 0 -0.1rem, -2rem 10rem 0 -0.1rem, -1rem 3rem 0 -0.2rem, 2rem 5rem 0 -0.2rem, -2rem 11rem 0 -0.2rem, 2rem 9rem 0 -0.2rem, -4rem 3rem 0 -0.2rem;
    }
  }
  &__rain{
    position: absolute;
    top: 12.8rem;
    left:0;
    width: 100%;
    height: 10rem;
    overflow:hidden;
    &-drops{      
      position: absolute;
      top:0;
      left: 13rem;
      height: 0.6rem;
      width: 0.6rem;
      background: #7a98e9;
      animation: snow 3s linear infinite;
      animation-delay: 1s;
      transform: translateY(-12rem) rotate(45deg);
      opacity:1;
      color: #7a98e9;
      box-shadow: 1rem 2rem, 1rem 7rem, 4rem 8rem, -5rem 8rem, -2rem 4rem, 0rem 11rem, 4rem 5rem, -2rem 8rem, 4rem 3rem 0 -0.1rem, 0rem 5rem 0 -0.1rem, -4rem 5rem 0 -0.1rem, -2rem 10rem 0 -0.1rem, -1rem 3rem 0 -0.2rem, 2rem 5rem 0 -0.2rem, -2rem 11rem 0 -0.2rem, 2rem 9rem 0 -0.2rem, -4rem 3rem 0 -0.2rem;    
      border-radius: 0 1rem 1rem;
    }
  }
  &__sun{
    position:absolute;
    top:1rem;
    right: 3.5rem;
    height: 5rem;
    width: 5rem;
    background: linear-gradient(45deg, #f09559 40%, #f0ca43);
    border-radius:50%;
    filter: drop-shadow(0 0 10px rgba(#efda90,0.4)) drop-shadow(0 0 30px rgba(#f0ca43,0.4));
    &-lights{
      position: absolute;
      inset: 0;
    animation: rotation 6s linear infinite;
    }
    &-light{
      position:absolute;
      top: -2.75rem;
      left: 50%;
      margin-left:-0.45rem;
      border-radius: 1rem;
      width: 0.9rem;
      height: 2.5rem;
      background: linear-gradient(45deg, #f0b343, #f0ca43);
      transform-origin: 50% 5.25rem;
      @for $c from 2 to 9 {
        &:nth-child(#{$c}){
          transform:rotate(($c - 1)* 360deg/8);
        }
      }
    }
  }
    &__thunder{
        position: absolute;
        top: 10rem;
        left: 50%;
        margin-left: -2.4rem;
        width: 4.8rem;
        height: 8.6rem;
        filter: drop-shadow(0px -1px 0px #cfb8e5) drop-shadow(0px 0px 0px #9a4ee7) drop-shadow(-2px -2px 1px #3c3762) drop-shadow(4px 1px 1px #3c3762);
      animation: thunder 3s infinite, floating 3s infinite;
      &:before,
      &:after{    
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        background: #645d95;
        height: 5rem;
        width: 3rem;
        border-radius: 0.4rem;
        box-shadow: inset -0.2rem -0.4rem 0.2rem #3c3762, inset -0.1rem -0.1rem 0.4rem #fff;
        clip-path: polygon(100% 100%, 0% 100%, 100% 0);
      }
      &:after{
        top: auto;
        bottom: 0;
        left: auto;
        right:0;
        clip-path: polygon(0% 100%, 100% 0%, 45% 0%, 0% 26%);
        box-shadow: inset 0.2rem 0.3rem 0.2rem #3c3762, inset 0.1rem 0.2rem 0.4rem #fff;
      }
    }
  &__cloud{
    position:absolute;
    left: 0;
    top: 1rem;
        width: 18rem;
    height: 12rem;
    background:rgb(255 255 255 / 45%);
    .weather--snow &{
    background:rgb(100 130 197 / 45%);
    }
    .weather--thunder &{
    background:rgb(116 116 116 / 45%);
    }
    .weather--rainbow & {
      background: #4a6676;
    }
    opacity: 1;
    backdrop-filter: blur(8px);
    clip-path: url(#cloud-path);
    box-shadow: inset 0rem -1.3rem 0.25rem -1rem #fff, inset 0rem 0rem 5rem 0rem #ffffff4d;
    &-reflect{
    height: 12rem;
    width: 11.9rem;
    border-radius: 50%;
    box-shadow: inset 0rem -1.1rem 0.25rem -1rem #fff, inset 0.45rem 0rem 0.25rem -0.25rem #fff, inset -0.45rem 0.5rem 0.25rem -0.45em #fff, inset 0.25rem 0.25rem 0.5rem 0rem rgb(0 0 0 / 30%);
      clip-path: polygon(0 0, 100% 0%, 100% 33%, 50% 30%, 50% 100%, 0% 100%);

      &--2{ 
        position: absolute;
    width: 8.7rem;
    height: 8.7rem;
    bottom: 0.1rem;
    right: 0.5rem;
      clip-path: polygon(0 0, 100% 0%, 100% 100%, 50% 100%, 29% 0%);
      }
    }
    &-shadow{
        position: absolute;
        left: 30rem;
        top: -30rem;
        width: 18rem;
        height: 9rem;
        border-radius: 50%;
        box-shadow: -36rem 38rem 7rem #00000054;
        z-index: -1;
    }
    &-svg{
      clipPath{
        transform: scale(0.65);
      }
    }
  }
}
              
            
!

JS

              
                // Inspired by
// 3D Icons | 1 | Weather
// https://dribbble.com/shots/18045563-3D-Icons-1-Weather?utm_source=ownedsocial
// by @george_finnbog
              
            
!
999px

Console