2

Is it possible to Grow/reveal an image from bottom to top?

The image I need to animate is an opaque PNG which is part of an animation sequence - the image is of a tower logo and I need to make it grow from base up.

This is the HTML -

        <div class="logoCover">
             <div class="logoTop">
             </div>
        </div>

I have set a fixed height on logoCover (height of the logo) and have tried animating height - but it always reveals from top down - any ideas?

4

1 回答 1

3

如果绝对定位的元素固定在其容器的底部,则可以通过“向上滑动”来显示它。

.logoTop {
    display: none;
    position: absolute;
    bottom: 0;
}

请注意,这.slideDown是 jQuery 中的“显示”方法,并且是.slideUp隐藏的。.slideDown即使它看起来向上滑动,您仍然需要使用它来显示它。

http://jsfiddle.net/ExplosionPIlls/UhNwB/

于 2013-02-19T11:59:25.843 回答