CSS Animation using Jquery and '.css'

前端 未结 2 1752
没有蜡笔的小新
没有蜡笔的小新 2021-01-24 05:58

So I have a piece of code. The purpose is to play a selected animation from Animate.css on click.

The code

  $(\".conta         


        
2条回答
  •  我在风中等你
    2021-01-24 06:12

    $(".container>parent").click(function() {
        $('.element').css({
            'animation': 'fadeInUp .2s',
            '-webkit-animation': 'fadeInUp .2s'
        });
    
        setTimeout(function(){
            $('.element').removeAttr('style');
        },300);
    });
    

提交回复
热议问题