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 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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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.

            
              <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
🕑 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