jQuery plugin animsition使用小结

下载地址:https://github.com/blivesta/animsition

文档地址:

实现的效果是,各种不同效果的转场效果

jQuery plugin animsition使用小结

<div> <div> <h1>Animsition: Sandbox</h1> </div> <h2>Defaults</h2> <ol> <li><a data-animsition-out-class="rotate-out" data-animsition-out-duration="500" href="https://www.jb51.net/page1.html" >Basic</a></li> <li><a data-animsition-out-class="rotate-out" data-animsition-out-duration="500" href="https://www.jb51.net/page2.html" >Options</a></li> </ol> </div> <script src="https://www.jb51.net/jquery-3.2.1.min.js"></script> <script src="https://www.jb51.net/js/animsition.js"></script> <script> $(document).ready(function() { $(".animsition").animsition({ inClass: 'flip-in-y', outClass: 'flip-out-y', inDuration: 1500, // outDuration: 800, linkElement: '.animsition-link', // e.g. linkElement: 'a:not([target="_blank"]):not([href^="#"])' loading: false, loadingParentElement: 'body', //animsition wrapper element loadingClass: 'animsition-loading', loadingInner: '', // e.g '<img src="https://www.jb51.net/loading.svg" />' timeout: false, timeoutCountdown: 5000, onLoadEvent: true, browser: [ 'animation-duration', '-webkit-animation-duration'], // "browser" option allows you to disable the "animsition" in case the css property in the array is not supported by your browser. // The default setting is to disable the "animsition" in a browser that does not support "animation-duration". overlay : false, overlayClass : 'animsition-overlay-slide', overlayParentElement : 'body', // transition: function(url){ window.location.href = url;} }); }); </script>

  注意!!!css文件的.animistion类的opacity设置了为0;需要改过来,要不然页面元素看不到!!!

总结

以上所述是小编给大家介绍的jQuery plugin animsition使用小结,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wygydp.html