title: How to animate a rolling rectangle
body: <p>I'd like to animate a rectangle to roll from the left of the screen to the right of the screen. Please notice that the transform-origin point should not be in the center of the rectangle, but in the bottom-right corner, so that it doesn't overpass the "hr" line or bounce in any way.</p>
  
  <p>This is what I have achieved untill now, but I'd like it to move continuously untill it gets to the right edge of the screen: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>hr {
    margin: 0;
  }
  
  div {
    width: 135px;
    height: 135px;
    box-shadow: inset 0 0 10px #000000;
    transform-origin: right bottom;
    animation-name: move;
    animation-duration: 2s;
    animation-timing-function: linear;
    animation-delay: 0;
    animation-iteration-count: infinite;
    animation-direction: alternate;
  }
  
  @keyframes move {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(90deg);
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;&lt;/div&gt;
  &lt;hr&gt;</code></pre>
  </div>
  </div>
  </p>