animation in native javascript

前端 未结 3 1982
無奈伤痛
無奈伤痛 2021-01-07 06:32

How do i run an animation(like changing CSS properties) in native javascript without using jQuery library\'s animate method?? I have tried jQuery library animate and the fra

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-07 06:56

    CSS3 can automatically animate changes to most style properties, using transition. It will probably run smoother than you can get with any javascript-based animation.

    There's a nice tutorial on how to use it, here.

提交回复
热议问题