Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8957541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:00:50+00:00 2026-06-15T15:00:50+00:00

I am sure the answer is staring me in the face, but I can’t

  • 0

I am sure the answer is staring me in the face, but I can’t seem to figure this out.

Goal: 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).

What I have tried: 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 mask-position and mask-repeat: none does not work to try and work around this.

What I think could work: 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.

My question: 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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:00:51+00:00Added an answer on June 15, 2026 at 3:00 pm

    UPDATE 8/5/2015

    Here is a new example using pure CSS!

    http://jsfiddle.net/SptRr/296/

    ORIGINAL ANSWER

    Here is a crude example, I hope you get the point though 🙂

    FIDDLE

    Heres a fiddle with a hover effect to fill the glass, just for fun!

    HOVER FIDDLE

    HTML

    <img src='http://www.videsignz.com/testing/images/water-front.png' />
    <div></div>
    

    CSS

    img {position:absolute; left:0px; top:0px; z-index:5;}
    div {position:absolute; left:0px; top:350px; background-color:blue; height:0px; display:block; width:350px;}
    

    JQuery

    function animateit(){
    
    $('div').animate({'height' : '350px', 'top' : 0 }, 2000, function(){
       $('div').animate({'height' : 0, 'top' : '350px' }, 2000, animateit);
    });
    
    }
    
    animateit();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sure the answer to this is stunningly simple - but I can't find
I've been trying to figure this out for so long that I'm sure it's
I'm sure this would be a simple question to answer but I can't for
I'm not sure if an answer for this already exists, as I can't figure
I'm sure there is a simple answer to this but I couldn't find it.
I'm sure I've seen this before and know the answer to it but after
The answer to this has got to be simple, but I sure don't see
I'm a vb.net guy trying to figure out MonoTouch c#. I made this data
I'm pretty sure I know the answer to this (that you can't do it),
I'm sure that it's rookie mistake, but I can't find an answer by myself.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.