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.

Quick-add: + add another resource

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.

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-container">
    <div class="ball-shadow">
    </div>
    <div class="ball">
    </div>
  </div>
</div>
            
          
!
            
              /* animation code */

@keyframes moveit{
  0% {left: 0%;}
  100% {left: 100%}
}

@keyframes bounce{
  0% {top: 0px; transform: scale(1, 1);}
  80%{transform: scale(0.85, 1);}
  100% {top: 120px; transform: scale(1.2,0.6);}
}

@keyframes scaleit{
  0% {transform: scale(0.4, 0.1); opacity: 0.3;}
  100% {transform: scale(1, 0.2);}
}


/* CSS */

html {
    height: 100%;
}
body {
    height: 100%;
    margin: 0;
    background-repeat: no-repeat;
    background-attachment: fixed;
  background-color: #e2cba1;
  background: linear-gradient(to bottom, #f2f6f8 0%,#d8e1e7 45%,#b5c6d0 46%,#e0eff9 70%,#ffffff 100%);
}


.container{
  position: absolute;
  width: auto;
  height: 200px;
  margin-top: 10%;
  right: 82px;
  left: 0px;
}

.ball-container{
  position: absolute;
  height: 200px;
  width: 82px;
  animation-name: moveit;
  animation-duration: 8s;
  animation-direction: alternate;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.ball{
  position: absolute;
  height: 80px;
  width: 80px;
  border-radius: 40px;
  background: radial-gradient(at 20px 20px, rgba(191,142,250,1) 0%, rgba(58,16,105,1) 100%);
  box-shadow: inset -10px -10px 10px rgba(0,0,0,.6);
  animation-name: bounce;
  animation-duration: 0.5s;
  animation-direction: alternate;
  animation-timing-function: cubic-bezier(.5,0,1,.5);
  animation-iteration-count: infinite;
}

.ball-shadow{
  margin-top: 120px;
  margin-left: -8px;
  height: 100px;
  width: 100px;
  background-color: rgba(0,0,0,0.6);
  filter: blur(8px);
  border-radius: 50px;
  animation-name: scaleit;
  animation-duration: 0.5s;
  animation-direction: alternate;
  animation-timing-function: cubic-bezier(.5,0,1,.5);
  animation-iteration-count: infinite;
}

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

Console