Flip div with two sides of html

后端 未结 5 1235
星月不相逢
星月不相逢 2021-01-01 04:52

I have a login form on a site I am currently building, and I also have a signup form. I would like to add some fancy animation to it by rotating the div to the other side wh

5条回答
  •  时光说笑
    2021-01-01 05:23

    I haven't got time to write any code right now, but some pointers that might help;

    1) You will need to use JavaScript, in conjunction with CSS, and probably a framework like jQuery, no point re-inventing the wheel, jQuery already has excellent animation stuff built in.

    2) Break down the animation into stages of what's actually happening. So roughly, shadow appears, giving the impression the form has lifted from the page, content fades, form width animates to 0, then the reverse process with the new content fading in.

    3) There are lots of excellent DOM manipulation effects already out there, search for cool jquery content switching, etc, you'll find lots.

提交回复
热议问题