jQuery animate “text-shadow” css property

前端 未结 2 1420
说谎
说谎 2021-02-20 13:05

So as i\'ve worked with jQuery\'s .animate() method i\'ve learned that in order to animate the left margin you would have to use something like this:



        
2条回答
  •  梦谈多话
    2021-02-20 13:42

    CSS transitions are the best way for this, as every browser in common usage that supports text-shadow also supports transitions.

    In that case, you just set the transition properties, then change the style either with JS or by changing the class.

    Basic example: http://jsfiddle.net/adZ42/1/

    More info on retrofitting this into jQuery: http://css3.bradshawenterprises.com/legacy/

提交回复
热议问题