I have a container with brown branches resembling the image, and I'm looking to hide it. When a button is clicked, I want it to reveal from the bottom to the top, almost like it's being unmasked. I've ruled out a typical bottom-up slide animation due to the presence of leaves at the top, so I'm exploring the idea of unveiling it with a mask effect.
Here's my current setup:
$('.button').click(function () {
$('#branchmain').show('slide', {direction: 'down'}, 1000);
});
#branchmain {
background-image: url(http://i.imgur.com/IV2C28A.png);
background-repeat: no-repeat;
display:none;
width: 114px;
height: 307px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
<div class="button">Click me!</div>
<div id="branchmain"></div>
Is there a way to apply a mask effect to the container and reveal it from bottom to top without actually moving it? I'm looking for a solution to achieve this effect.