基于Anime.js动感圆形轮播图特效

基于Anime.js动感圆形轮播图特效

这是一款基于anime.js的动感圆形轮播图特效。该轮播图特效在切换时,图片沿着圆形的路径进行轮播,并且各种图片之间的运动速度的差异,形成了视觉差特效。

使用方法
在页面中引入base.css和demo.css文件和anime.min.js、demo.js文件。

1
2
3
4
<link href="css/base.css" rel="stylesheet">  
<link href="css/demo.css" rel="stylesheet">  
<script type="text/javascript" src="js/anime.min.js"></script>            
<script type="text/javascript" src="js/demo.js"></script>

HTML结构
该轮播图的基本HTML结构如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<section class="page-wrapper" id="coidea">
  <div class="slider">
   
    <ul class="slider-list">
       
      <li class="slider-list__item slider-list__item_active">
        <span class="back__element">
          <img src="assets/img/back_apple_002.png" />
        </span>
        <span class="main__element">
          <img src="assets/img/bottle_apple_002.png" />
        </span>
        <span class="front__element">
          <img src="assets/img/front_apple_002.png" />
        </span>
        <span class="title__element">
          <span class="title">apple</span>
        </span>
        <span class="more__element">
          <span class="content">
            <span class="headline">apple</span>
            <span class="excerpt">Lorem ipsum dolor, ...</span>
            <span class="link">
              <div class="fill"></div>
              <a href="#">Open catalog</a>
            </span>
          </span>
        </span>
       </li>
 
      <li class="slider-list__item">
        <span class="back__element">
          <img src="assets/img/back_grapes_001.png" />
        </span>
        <span class="main__element">
          <img src="assets/img/bottle_grapes_001.png" />
        </span>
        <span class="front__element">
          <img src="assets/img/front_grapes_001.png" />
        </span>
        <span class="title__element">
          <span class="title">grapes</span>
        </span>
        <span class="more__element">
          <span class="content">
            <span class="headline">grapes</span>
            <span class="excerpt">Lorem ipsum dolor, .../span>
            <span class="link">
              <div class="fill fill-dark"></div>
              <a href="#">Open catalog</a>
            </span>
          </span>
        </span>
       </li>
 
       <li class="slider-list__item">
        <span class="back__element">
          <img src="assets/img/back_strawberry_003.png" />
        </span>
        <span class="main__element">
          <img src="assets/img/bottle_strawberry_003.png" />
        </span>
        <span class="front__element">
          <img src="assets/img/front_strawberry_003.png" />
        </span>
        <span class="title__element">
          <span class="title">strawberry</span>
        </span>
        <span class="more__element">
          <span class="content">
            <span class="headline">strawberry</span>
            <span class="excerpt">Lorem ipsum dolor, ...</span>
            <span class="link">
                <div class="fill"></div>
              <a href="#">Open catalog</a>
            </span>
          </span>
        </span>
       </li>
       
    </ul>
     
    <div class="slider__nav-bar">
      <a class="nav-control"></a>
      <a class="nav-control"></a>
      <a class="nav-control"></a>
    </div>
     
    <div class="slider__controls">
      <a class="slider__arrow slider__arrow_prev"></a>
      <a class="slider__arrow slider__arrow_next"></a>
    </div>
 
  </div>      
 
</section>
当前内容只有登录了才能查看,如果您已经注册,请登录
1

发表评论