幻灯片/轮播

基于anime动感圆形轮播图特效

创客主机


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

使用方法:

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

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

HTML代码:

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

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

该轮播图插件的官方网址为:https://coidea.website/categories/challenges/circular-slider-with-anime-js/

(0)

本文由 创客云 作者:创客云 发表,转载请注明来源!

阿里云

热评文章

发表评论

嘿,欢迎咨询!