canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #FFF;
}
div.flying-pixel {
    background-color: red;
    width: 10px;
    height: 10px;
    position: fixed;
    top: 10%;
    left: 10%;
    z-index: 9999;
    animation-name: fp;
    animation-duration: 4s;
    animation-iteration-count: infinite;
    animation-direction: normal;
    animation-timing-function: linear;
}

@keyframes fp {
  0%   {background-color:red;    left:10%; top:10%;}
  25%  {background-color:yellow; left:90%; top:10%;}
  50%  {background-color:blue;   left:90%; top:90%;}
  75%  {background-color:green;  left:10%; top:90%;}
  100% {background-color:red;    left:10%; top:10%;}
}