Swiper中文论坛

标题: swiper animate 问题(没有动画效果)大神进来看看 [打印本页]

作者: 忆寒惜    时间: 2017-4-9 13:13
标题: swiper animate 问题(没有动画效果)大神进来看看
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>无标题文档</title>
  6. <link rel="stylesheet" type="text/css" href="js/swiper/swiper-3.4.2.min.css">
  7. <link rel="stylesheet" type="text/css" href="js/swiper/animate.min.css">
  8. </head>
  9. <body>
  10.         <div class="swiper-container">
  11.             <div class="swiper-wrapper">
  12.                 <div class="swiper-slide">
  13.                            <p class="ani" swiper-animate-effect="bounceInLeft" swiper-animate-duration="2s" swiper-animate-delay="0.1s">Page1</p>       
  14.             </div>
  15.         </div>
  16.     </div>
  17.         <script src="js/swiper/swiper-3.4.2.min.js"></script>
  18.         <script src="js/swiper/swiper.animate1.0.2.min.js"></script>
  19.     <script>
  20.         var mySwiper = new Swiper ('.swiper-container',{
  21.                 pagination: '.swiper-pagination',
  22.                 onInit:function(swiper){
  23.                         swiperAnimateCacher(swiper);//隐藏动画元素
  24.                         swiperAnimate(swiper);//初始化完成开始动画
  25.                         },
  26.                 onSlideChangeEnd:function(swiper){
  27.                         swiperAnimate(swiper);//每个slide切换结束时也运行当前的slide动画
  28.                         }
  29.                 })
  30.                 </script>
  31. </body>
  32. </html>
复制代码
求大神们帮忙看看,照着官网写的,但是没有任何动画效果,不知道哪里出了问题,我在DW里面写的 没有自动索引到 ani 这个类 只有 animate 这个类。 但是改成 animate 也没有任何动画效果

作者: 忆寒惜    时间: 2017-4-9 13:15
萌新一枚,刚学习前端,第一次使用 swiper 表示一脸懵逼,求大神们指出错误
作者: 菜鸟zbb    时间: 2017-4-10 18:00
js方法调用没错,可能你的js引入进来,有问题,还是可能就是你js版本不对

作者: 638340    时间: 2018-3-6 10:29
本帖最后由 638340 于 2018-3-6 10:55 编辑

同求,我的是循环一次后才不出来的,而且还会延迟好长时间才会出现,第一遍都是好的,只会在IOS 6上面出现,安卓还是好的
作者: xudong    时间: 2018-3-8 17:27
ani标签有没有添加绝对定位?
作者: 漱溟    时间: 2018-5-17 14:29
xudong 发表于 2018-3-8 17:27
ani标签有没有添加绝对定位?

如果用了会怎样?
作者: a123    时间: 2018-7-28 19:20
重新倒了js和css文件就没问题了,你的文件应该有问题
作者: fei901011    时间: 2018-8-15 17:51
你的问题解决了么?animate的css和js都加载成功了,就是没有动画效果




欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/) Powered by Discuz! X3.2