removeClass and fade animation

后端 未结 4 828
抹茶落季
抹茶落季 2021-01-19 01:46

I have this code

  • LINK1
4条回答
  •  攒了一身酷
    2021-01-19 02:19

    Yeah, you could do this with some CSS3.

    You just add the following to .current.

    .current{
        color: #f00;
        background-color: #000;
        transition: color 0.5s, background-color 0.5s;
        -webkit-transition: color 0.5s, background-color 0.5s; /* Safari */
    }
    

    Obviously you'll need to change color/background-color to the attributes you'd like to animate. Otherwise, Cubed Eye's suggestion of including JqueryUI is great, as the removeClass in jQueryUI will do it all for you..

提交回复
热议问题