How do we add css + animation in jquery?

后端 未结 5 1759
耶瑟儿~
耶瑟儿~ 2021-02-15 12:26

Here is a little snippet of what I\'m trying to do:

$(\'#why-red a\').hover(function() {
    $(this).animate({ -webkit-transform: \'scale(1.1)\'  }, \'slow\');           


        
5条回答
  •  孤街浪徒
    2021-02-15 13:04

    If you wish .animate() used transitions automatically when available (and fallback to regular animation otherwise), you should check out "Enhancing jQuery’s animate function to automatically use CSS3 transitions".

    Github repository of the plugin.

提交回复
热议问题