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="container">
  <div class="ball"></div>
  <div class="ball-shadow"></div>
</div>
            
          
!
            
              $animationSpeed : 1s; //szybkosc pojedynczego powtorzenia animacji

html, body {
  height:100%;
  margin:0;
  padding:0;
}

.container {
  height:100%;
  position:relative;
  background: linear-gradient(to top, #56A902 0%, #75D701 150px, #F8F8FF 150px,#8EC0E4 100%);
}

.ball {
  position:absolute;
  left:50%;
  bottom:130px;
  width:150px;
  height:150px;
  background:#ffd65e;
  border-radius:50%;
  background: radial-gradient(ellipse at center, #ffffff 0%, #ffffff 5%, #ffd65e 15%, #E5B42C 50%, #BC8B00 100%);
  background-size:210px 210px;
  background-position:-50px -50px;  
  z-index:2;
  transform:translateX(-50%);
  transform-origin:75px 150px;
  animation: ballAnimation $animationSpeed 0s infinite ease-in-out alternate;
}

.ball-shadow {
  position:absolute;
  left:50%;
  bottom:28px;
  width:130px;  
  height:30px;  
  border-radius:50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 10%, rgba(0,0,0,0) 70%, rgba(0,0,0,0) 100%);
  z-index:1;
  transform:translateX(-50%);
  
  animation: ballShadowAnimation $animationSpeed 0s infinite ease-in-out alternate;  
}

@keyframes ballAnimation {
  0% {transform: scale(1, 1) translateX(-50%); background-size:210px 210px;}  
  95% {bottom:40px; transform: scale(1, 0.8) translateX(-50%); }
  100% {bottom:40px; transform: scale(1, 0.8) translateX(-50%); }
}

@keyframes ballShadowAnimation {
  0% {opacity:0; transform:translateX(-50%) scale(0.8, 1);}
  80% {opacity:0.3; transform:translateX(-50%) scale(1, 1);}
  95% {opacity:0.4; transform:translateX(-50%) scale(1.2, 1);}
  100% {opacity:0.6; transform:translateX(-50%) scale(1.3, 1);}
}
            
          
!
999px
Loading ..................

Console