title: Reveal image underneath a mask css/javascript
body: <p>I am sure the answer is staring me in the face, but I can't seem to figure this out.</p>
  
  <p><strong>Goal:</strong> What I am trying to do is animate liquid filling up a cup.  This doesn't have to be super realistic.  I was thinking that I could have a cup image as one layer, and behind it have the image of liquid and reveal the liquid slowly to give the illusion that it's being filled it up.  This will work in conjunction with a preloader (that I have already built).</p>
  
  <p><strong>What I have tried:</strong>  My first thought was to try and use a CSS Mask, so I tinkered with that a little bit.  While it does have a wide range of options, you can't just define your image and everything outside of the mask that you've define would show the image behind.  Instead, it only shows the places you have cut out in your mask, and everything outside of your mask is white.  Using <code>mask-position</code> and <code>mask-repeat: none</code> does not work to try and work around this.</p>
  
  <p><strong>What I think could work:</strong>  Maybe some sort of background positioning that gets animated??  While looking into this, it didn't seem like I was going to be able to make this do what I wanted.  I know that this would work in an animation capacity to move the mask layer slowly to give it that illusion of a cup being filled up.</p>
  
  <p><strong>My question:</strong>  How would I reveal parts of an image slowly to give it the illusion that it's slowly filling up a cup by using an image of a cup as a top layer and the liquid as the layer behind with a mask between that gets animated to show the liquid?</p>