I need CSS3 transition to work in IE9

后端 未结 2 1313
一整个雨季
一整个雨季 2020-12-07 18:09

I create a greeting card for a client with css transition but I did not know that it was not compatible with IE9.

The greeting card is this http://voeux.geekarts.f

2条回答
  •  时光说笑
    2020-12-07 18:36

    You can try the reverse approach with JQuery Transit http://ricostacruz.com/jquery.transit/

    It will map JQuery style transitions to CSS3 transitions and with the appropriate code (below), if the CSS3 transitions are not available then it may fallback gracefully to standard JQuery.

    JQuery Transit uses a simple Javascript method, transition() to perform every operation. Syntax is very similar to to JQuery animate().

    $('.box').transition({ opacity: 0 });
    

    If you "map" transition() to JQuery animate() it will perform the same operation in standard JQuery (if available). The following code (taken from the example page) will use animate() if CSS3 transitions are not available:

    // Delegate .transition() calls to .animate()
    // if the browser can't do CSS transitions.
    
    if (!$.support.transition)
      $.fn.transition = $.fn.animate;
    

提交回复
热议问题