title: How to move a div up and down infinitely in CSS?
body: <p>I'm trying to do the simple task of moving a div up and down to give a floating/hovering effect using bottom instead of top.</p>
  
  <p>I'm new to CSS and keyframes! As you can probably tell. But here is what I have tried and it didn't seem to do anything:</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>.Mail {
    margin-top: -77px;
    margin-left: 791px;
    animation: MoveUpDown 1s linear infinite;
  }
  
  @keyframes MoveUpDown {
    0%, 100% {
      bottom: 0;
    }
    50% {
      bottom: 20px;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" rel="stylesheet"&gt;
  
  &lt;i class="Mail fas fa-envelope"&gt;&lt;/i&gt;</code></pre>
  </div>
  </div>
  </p>