title: Applying transform:scale to just the background image
body: <p>I am trying to achieve a classy zoom in effect on a div's background image with background-size:cover using transform:scale. </p>
  
  <p>The problem I am facing is that the scale seems to enlarge the div as the background-image zooms in.</p>
  
  <p>Is there a way to only apply the effect to the background image? Or am I doing something wrong?</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>.despre-noi-image {
    width: 40%;
    height: 500px;
    background: url('https://static.independent.co.uk/s3fs-public/styles/story_large/public/thumbnails/image/2017/04/18/16/wine-evening.jpg') no-repeat center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    text-align: left;
    background-position-x: 50%;
    background-position-y: 0%;
    -webkit-animation: zoomin 10s linear;
    animation: zoomin 10s linear;
    animation-fill-mode: forwards;
  }
  
  @-webkit-keyframes zoomin {
    0% {
      -webkit-transform: scale(1);
      transform: scale(1);
    }
    100% {
      -webkit-transform: scale(2);
      transform: scale(2);
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="despre-noi-image"&gt;
    &amp;nbsp;
  &lt;/div&gt;
  &lt;!-- despre-noi-image --&gt;</code></pre>
  </div>
  </div>
  </p>