title: CSS Hover bug, overlay fluctuating effect on hover
body: <p>I am trying to place one overlay div over another so that on hover on the card div displays overlay div above it. But on hover, I don't know why there is some bug which creates a fluctuating effect before displaying the overlay div.</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>.overlay {
   opacity: 0;
   z-index: -2;
   height: 290px;
   width: 240px;
   background: #000;
   border-radius: 30px; 
   /*display: inline-block;*/
   position: relative;
   top: -310px;
   transition: all .4s ease;
  }
  .card:hover + .overlay {
   opacity: 1;
   z-index: 1;
   transition: all .4s ease;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;div class="card" style="background: #fff; height: 290px; width: 240px; border-radius: 30px; display: inline-block; margin:20px; box-shadow: 0 2px 6px rgba(112,112,112,0.2);"&gt;&lt;img src="thumb.png" height="60%;"&gt;&lt;/div&gt;
   &lt;div class="overlay"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>What am I doing wrong here?</p>