CodePen

HTML

            
              <h1>Animate with Top/Left</h1>

<div id="animate"></div>
            
          
!
via HTML Inspector

CSS

            
              body {
  padding: 30px;
}

#animate {
  position: absolute;
  top: 100px;
  left: 30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: red;
  
  animation: move 3s ease infinite;
}

@keyframes move {
  50% {
     top: 200px;
     left: 130px;
  }
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................