title: How to hide block with keyframes?
body: <p>Now after the animation is an empty div .text. I have to hide the block completely with smooth opacity animation. (such as display:none, but display: none doesn't animate) How do it with keyframes?</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>.text {
    animation:  opacity-animation .5s forwards;
  }
  
  @keyframes opacity-animation {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="text"&gt;text text text text&lt;/div&gt;
  This fist stroke of text</code></pre>
  </div>
  </div>
  </p>