title: Why mouseout animation is not working properly?
body: <p>I have tried the following. It worked in mouse in but doesn't work properly on mouse out.</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>@-webkit-keyframes animborder {
    0% {
      height: 100%;
      width: 8px;
      top: auto;
    }
    50% {
      height: 8px;
      width: 8px;
      top: auto;
    }
    100% {
      height: 8px;
      width: 100%;
      top: auto;
    }
  }
  
  @keyframes animborder {
    0% {
      height: 100%;
      width: 8px;
      top: auto;
    }
    50% {
      height: 8px;
      width: 8px;
      top: auto;
    }
    100% {
      height: 8px;
      width: 100%;
      top: auto;
    }
  }
  
  .section-title {
    margin-bottom: 45px;
    display: inline-block;
    position: relative;
    z-index: 1;
    padding: 15px 30px;
  }
  .section-title::before {
    content: '';
    position: absolute;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: rgba(87, 107, 181, 0.45);
    z-index: -1;
    transition: 0.7s ease-in-out;
  }
  .section-title:hover::before {
    width: 100%;
    height: 8px;
    -webkit-animation: animborder 0.7s ease-in-out;
    -moz-animation: animborder 0.7s ease-in-out;
    -o-animation: animborder 0.7s ease-in-out;
    animation: animborder 0.7s ease-in-out;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1 class="section-title"&gt;Check our Videos&lt;/h1&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have followed In and out keyframes for mouse over and mouse out but it didn't worked and the effect animated on page refresh. Could you please guide me where I am doing wrongly.</p>