cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              <div class="wrapper">
<!--  Background  -->
  <div class="bg">
    <div class="bg__wrapper"><div class="bg__circle"></div></div>
    <div class="bg__wrapper"><div class="bg__circle"></div></div>
    <div class="bg__wrapper"><div class="bg__circle"></div></div>
    <div class="bg__wrapper"><div class="bg__circle"></div></div>
  </div>
  <div class="bg bg-bblue">
    <div class="bg__wrapper"><div class="bg__circle"></div></div>
    <div class="bg__wrapper"><div class="bg__circle"></div></div>
    <div class="bg__wrapper"><div class="bg__circle"></div></div>
    <div class="bg__wrapper"><div class="bg__circle"></div></div>
  </div>
  
<!--  Planet  -->
  <div class="planet">
    <div class="planet -white"></div>
  </div>
  
<!-- Eyes -->
  <svg width="60" height="60"  class="eye-b -left" xmlns="http://www.w3.org/2000/svg">
    <path d="M42.4 16.5C27 15.5 14.6 24.3 14.8 43" opacity="1" stroke-opacity="null" stroke-width="10.5" stroke="#251870" fill="none"/>
  </svg>
  <svg width="60" height="60"  class="eye-b -right" xmlns="http://www.w3.org/2000/svg">
    <path d="M42.4 16.5C27 15.5 14.6 24.3 14.8 43" opacity="1" stroke-opacity="null" stroke-width="10.5" stroke="#251870" fill="none"/>
  </svg>
  <div class="eyeball -left"></div>
  <div class="eyeball -right"></div>
  
<!--  Mouth  -->
  <svg width="60" height="60" xmlns="http://www.w3.org/2000/svg" class="mouth">
    <path fill="#130a67" stroke="#130a67" stroke-width="3.5" d="M49.2 29.7c2.6.7-4.4 16-19 15.6-14-.5-22.4-15.4-19.8-16 7.7-1 31.2-1.4 38.8.4z"/>
    <ellipse stroke="#ea2e7a" fill="#ea2e7a" stroke-width="null" cx="30.6" cy="40.3" rx="9" ry="3.8"/>
  </svg>
  
<!-- Blush -->
  <div class="blush -left"></div>
  <div class="blush -right"></div>
  
<!-- Circles Planet -->
  <div class="c-face c-1"></div>
  <div class="c-face c-2"></div>
  <div class="c-face c-3"></div>
  <div class="c-face c-4"></div>
  <div class="c-face c-5"></div>
  <div class="c-face c-6"></div>
  <div class="c-face c-7"></div>
  <div class="c-face c-8"></div>
  <div class="c-face c-9"></div>
  <div class="c-face c-10"></div>
  <div class="c-face c-11"></div>
  <div class="c-face c-12"></div>
  
<!-- Circles Background -->
  <div class="c-bg c-1"></div>
  <div class="c-bg c-2"></div>
  <div class="c-bg c-3"></div>
  <div class="c-bg c-4"></div>
  <div class="c-bg c-5"></div>
  <div class="c-bg c-6"></div>
  <div class="c-bg c-7"></div>
  <div class="c-bg c-8"></div>
  <div class="c-bg c-9"></div>
  <div class="c-bg c-10"></div>
  <div class="c-bg c-11"></div>
  <div class="c-bg c-12"></div>
  <div class="c-bg c-13"></div>
  <div class="c-bg c-14"></div>
  <div class="c-bg c-15"></div>
  <div class="c-bg c-16"></div>
  
<div class="stars-wrapper">
<svg width="60" height="60" class=" star s-1" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
</svg>
<svg width="60" height="60" class=" star s-2" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
</svg>
<svg width="60" height="60" class=" star s-3" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
</svg>
<svg width="60" height="60" class=" star s-4" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
</svg>

<svg width="60" height="60" class=" star s-5" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
</svg>

<svg width="60" height="60" class=" star s-6" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
</svg>

<svg width="60" height="60" class=" star s-7" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
  </svg>
<svg width="60" height="60" class=" star s-8" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
  </svg>
<svg width="60" height="60" class=" star s-9" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
  </svg>
<svg width="60" height="60" class=" star s-10" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
</svg>
<svg width="60" height="60" class=" star s-11" xmlns="http://www.w3.org/2000/svg">
  <path stroke="#000" d="M32 11.6s-1.8-4.7-4.3.5c-2.5 5.5-1.4 8-4.8 12-3.8 4-9 2.5-10.4 6-1.2 4 5.2 3.6 10.5 7.6S26.8 51 29.7 51c5.8 0 3.7-10.4 7-13.8 3.2-2.5 12-3.7 11-6.6-.7-3-5-2.7-10.5-6.3-5.3-3.7-3-10.4-5-12.7z" stroke-width="1.5"/>
</svg>
</div>
</div>

<!-- Stars -->

  


<!-- Filter -->
<svg>
  <defs>
    <filter id="goo1">
      <feGaussianBlur in="SourceGraphic" stdDeviation="18" result="blur"></feGaussianBlur>
      <feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 19 -9" result="goo"></feColorMatrix>
    </filter>
  </defs>
</svg>

            
          
!
            
              // Container
body{
  background:#0c0c0c;
}
.wrapper{
  height:500px;
  width:500px;
  min-width:500px;
  min-height:500px;
  position:relative;
  display: block;
  background-color:#fff;
  position: absolute;
  transform:translate(-50%,-50%);
  top:50%;
  left:50%;
}
.stars-wrapper{
  transform:translate(-90px,-180px);
}

// Background
.bg{
  height:280px;
  width:280px;
  background-color:#130a67;
  position: absolute;
  left:50%;
  top:50%;
  border-radius:40px;
  filter: url("#goo1"); 
  transform-origin:center center;
  transition:transform 1.3s ease;
  transform:translate(-50%,-50%) rotate(45deg);
  
  &.bg-bblue{
    transform:translate(-50%,-50%) rotate(70deg) scale(0.65);
    background-color:#4681e7;
    .bg__circle{
      background-color:#4681e7;
    }
  }
  .bg__circle{
    height:120px;
    width:120px;
    background-color:#130a67;
    position:absolute;
    border-radius:50%;
    transform:translate(0,0);
    transition:transform 1s ease;
  }
  .bg__wrapper{
    // background-color:red;
    height:280px;
    width:280px;
    position:absolute;
    &:nth-of-type(1){
      .bg__circle{
        top:-15px;
        left:-15px;
      }
    }
    &:nth-of-type(2){
      .bg__circle{
        top:-15px;
        right:-15px;
      }
    }
    &:nth-of-type(3){
      .bg__circle{
        bottom:-15px;
        right:-15px;
      }
    }
    &:nth-of-type(4){
      .bg__circle{
        bottom:-15px;
        left:-15px;
      }
    }
  }
}
@keyframes float {
	0% {
		transform:translate(-50%,-50%);
	}
	50% {
		transform:translate(-50%,-52%);
	}
	100% {
		transform:translate(-50%,-50%);
	}
}
// Planet
.planet{
  position:absolute;
  transform:translate(-50%,-50%);
  top:50%;
  left:50%;
  background-color:#a3f8ff;
  height:220px;
  width:220px;
  border-radius:50%;
  overflow:hidden;
  animation: float 4s ease-in-out infinite;
  &.-white{
    top:41%;
    background-color:#fff;
    animation:none;
  }
}

.eye-b{
  stroke-linecap: round;
  position:absolute;
  transform:scale(.4);
  &.-left{
    left:176px;
    top:185px;
  }
  &.-right{
    left:259px;
    top:185px;
    transform:scale(.4) rotateY(180deg);
  }
}

.eyeball{
  height:18px;
  width:18px;
  background-color:#251870;
  position:absolute;
  border-radius:50%;
  
  &.-left{
    left:208px;
    top:220px;
  }
  &.-right{
    left:265px;
    top:220px;
  }
}

.mouth{
  position:absolute;
  transform:translate(-50%,-50%) scale(1.2);
  animation: float 4s ease-in-out infinite;
  top:53%;
  left:calc(50% - 2px);
  stroke-linecap: round;
}
.blush{
  height:30px;
  width:30px;
  border-radius:50%;
  background-color:#ea2e7a;
  position:absolute;
  &.-left{
    top:245px;
    left:178px;  
  }
  &.-right{
    top:245px;
    left:290px;
  }
}

.c-face{
  position:absolute;
  background-color:#a3f8ff;
  border-radius:50%;
  
  &.c-1{
    height:30px;
    width:30px;
    top:295px;
    left:165px;
  }
  &.c-2{
    height:25px;
    width:25px;
    top:325px;
    left:220px;
  }
  &.c-3{
    height:13px;
    width:13px;
    top:330px;
    left:273px;
  }
  &.c-4{
    height:22px;
    width:22px;
    top:220px;
    left:150px;
  }
  &.c-5{
    height:12px;
    width:12px;
    top:200px;
    left:157px;
    background-color:#467fe6;
  }
  &.c-6{
    height:18px;
    width:18px;
    top:305px;
    left:250px;
    background-color:#467fe6;
  }
  &.c-7{
    height:13px;
    width:13px;
    top:165px;
    left:190px;
    background-color:#d3fffe;
  }
  &.c-8{
    height:45px;
    width:45px;
    top:150px;
    left:255px;
    background-color:#d3fffe;
    opacity:0.7;
  }
  &.c-9{
    height:25px;
    width:25px;
    top:180px;
    left:305px;
    background-color:#a3f8ff;
  }
  &.c-10{
    height:20px;
    width:20px;
    top:185px;
    left:225px;
    opacity:0.6;
    background-color:#d3fffe;
  }
  &.c-11{
    height:12px;
    width:12px;
    top:235px;
    left:340px;
    opacity:1;
    background-color:#467fe6;
  }
  &.c-12{
    height:12px;
    width:12px;
    top:215px;
    left:340px;
    opacity:1;
    background-color:#d3fffe;
  }
}

.star{
  position:absolute; 
  transform:scale(0.5);
  &.s-1{
    top:300px;
    left:180px;
    *{
      fill:#261a6e;
      stroke:#261a6e;
    }
  }
  &.s-2{
    transform:scale(0.3);
    top:365px;
    left:170px;
    *{
      fill:#d3fffe;
      stroke:#d3fffe;
    }
  }
  &.s-3{
    transform:scale(0.3);
    top:385px;
    left:150px;
    *{
      fill:#fff;
      stroke:#fff;
    }
  }
  &.s-4{
    transform:scale(0.4);
    top:435px;
    left:180px;
    *{
      fill:#4580e4;
      stroke:#4580e4;
    }
  }
  &.s-5{
    transform:scale(0.3);
    top:525px;
    left:200px;
    *{
      fill:#25196d;
      stroke:#25196d;
    }
  }
  &.s-6{
    transform:scale(0.4);
    top:535px;
    left:320px;
    *{
      fill:#4580e4;
      stroke:#4580e4;
    }
  }
  &.s-7{
    transform:scale(0.5);
    top:550px;
    left:400px;
    *{
      fill:#a4f7ff;
      stroke:#a4f7ff;
    }
  }
  &.s-8{
    transform:scale(0.35);
    top:350px;
    left:430px;
    *{
      fill:#a3f8fd;
      stroke:#a3f8fd;
    }
  }
  
  &.s-9{
    transform:scale(0.35);
    top:350px;
    left:490px;
    *{
      fill:#261971;
      stroke:#261971;
    }
  }
  
  &.s-10{
    transform:scale(0.3);
    top:265px;
    left:325px;
    *{
      fill:#d3fffe;
      stroke:#d3fffe;
    }
  }
  &.s-11{
    transform:scale(0.3);
    top:240px;
    left:390px;
    *{
      fill:#a2f7fc;
      stroke:#a2f7fc;
    }
  }  
}

.c-bg{
    position:absolute;
    border-radius:50%;
    &.c-1{
      width:50px;
      height:50px;
      top:85px;
      left:110px;
      background-color:#4580e6;
    }
    &.c-2{
      width:10px;
      height:10px;
      top:95px;
      left:165px;
      background-color:#d3fffe;
    }
    &.c-3{
      width:10px;
      height:10px;
      top:105px;
      left:335px;
      background-color:#447fe5;
    }
    &.c-4{
        width:27px;
        height:27px;
        top:120px;
        left:350px;
        background-color:#d3fffe;
    }
    &.c-5{
      width:50px;
      height:50px;
      top:350px;
      left:350px;
      background-color:#4580e6;
    }
    &.c-6{
        width:10px;
        height:10px;
        top:330px;
        left:380px;
        background-color:#d3fffe;
      }
    &.c-7{
        width:25px;
        height:25px;
        top:345px;
        left:100px;
        background-color:#d3fffe;
      }
    &.c-8{
        width:13px;
        height:13px;
        top:349px;
        left:135px;
        background-color:#4580e8;
      }
    &.c-9{
        width:30px;
        height:30px;
        top:245px;
        left:80px;
        background-color:#ffffff;
      }
    &.c-10{
        width:30px;
        height:30px;
        top:265px;
        left:380px;
        background-color:#ffffff;
      }
    &.c-11{
        width:15px;
        height:15px;
        top:240px;
        left:373px;
        background-color:#d3fffe;
      }
    &.c-12{
        width:15px;
        height:15px;
        top:248px;
        left:403px;
        background-color:#ffffff;
      }
    &.c-13{
        width:30px;
        height:30px;
        top:380px;
        left:212px;
        background-color:#fff;
      }
    &.c-14{
        width:18px;
        height:18px;
        top:370px;
        left:275px;
        background-color:#d3fffe;
      }
    &.c-15{
        width:35px;
        height:35px;
        top:85px;
        left:215px;
        background-color:#fff;
      }
    &.c-16{
        width:20px;
        height:20px;
        top:80px;
        left:265px;
        background-color:#d5fffe;
      }
}

            
          
!
            
              var circlesBgs = document.querySelectorAll('.c-bg');
for(var i=0;i<circlesBgs.length;i++){
  const tl = new TimelineMax({repeat:-1});
  tl.to(circlesBgs[i],2,{opacity:0,delay:0.3*Math.random()});
  tl.to(circlesBgs[i],2,{opacity:1});
  tl.seek(2*Math.random());
}

var stars = document.querySelectorAll('.star');
for(var i=0;i<stars.length;i++){
  const tl = new TimelineMax({repeat:-1});
  tl.to(stars[i],2,{opacity:0,scale:0.2});
  tl.to(stars[i],2,{opacity:1,scale:0.4});
  tl.to(stars[i],2,{opacity:1,scale:0.2});
  tl.seek(6*Math.random());
}

var blobs = document.querySelectorAll('.bg__wrapper');
for(var i=0;i<blobs.length;i++){
  const tl = new TimelineMax({repeat:-1});
  tl.to(blobs[i],20,{rotation:360}); 
}

            
          
!
999px
Loading ..................

Console