返回顶部
首页 > 资讯 > 前端开发 > VUE >JavaScript怎么实现移动端手势滑动的幻灯片切换效果
  • 176
分享到

JavaScript怎么实现移动端手势滑动的幻灯片切换效果

2024-04-02 19:04:59 176人浏览 薄情痞子
摘要

这篇文章主要介绍了javascript怎么实现移动端手势滑动的幻灯片切换效果的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇JavaScript怎么实现移动端手势滑动的幻灯片切换

这篇文章主要介绍了javascript怎么实现移动端手势滑动的幻灯片切换效果的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇JavaScript怎么实现移动端手势滑动的幻灯片切换效果文章都会有所收获,下面我们一起来看看吧。

代码如下:

<!DOCTYPE html>

<html lang="zh">

<head>

         <meta charset="UTF-8">

         <meta Http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

         <meta name="viewport" content="width=device-width, initial-scale=1.0">

         <title>支持移动端手势滑动的幻灯片切换制作</title>

         <meta name="keyWords" content="支持移动端手势滑动的幻灯片切换制作" />

         <meta name="description" content="支持移动端手势滑动的幻灯片切换制作" />

         <link rel="stylesheet" type="text/CSS" href="css/nORMalize.css" />

         <link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">

         <link rel="stylesheet" type="text/css" href="css/style.css">

         <link rel="stylesheet" type="text/css" href="dist/swipeslider.css">

        

</head>

<body>

         <div class="htmleaf-container">

                   <header class="htmleaf-header">

                            <h2> 支持移动端手势滑动的幻灯片切换</h2>

                  

                   </header>

                   <article class="container">

                       <section>

                        

                         <figure id="full_feature" class="swipslider">

                           <ul class="sw-slides">

                            <li class="sw-slide">

                               <img src="img/summer_beach.jpg" alt="Summer beach concept">

                             </li>

                             <li class="sw-slide">

                               <img src="img/lang_yie_ar_kung_fu.jpg" alt="Lang from Yie Ar Kung Fu">

                             </li>      

                             <li class="sw-slide">

                               <img src="img/wanted1.jpg" alt="Example of a not sized slide">

                             </li>

                             <li class="sw-slide">

                               <img src="img/tiny_vacation.jpg" alt="Tiny Tina">

                             </li>

                             <li class="sw-slide">

                               <img src="img/borderlands_tiny_tina.jpg" alt="Tiny Tina from Borderlands 2">

                             </li>

                             <li class="sw-slide">

                               <img src="img/redhead.jpg" alt="Redhead girl">

                             </li>

                           </ul>

                         </figure>

                        

                       </section>

                       <section>

                         <h3>Content slider</h3>

                         <p>Image slider can work as content slider.</p>

                         <figure id="content_slider" class="swipslider">

                           <ul class="sw-slides">

                             <li class="sw-slide">

                               <figure class="wanted sw-content">

                                 <img src="img/wanted1.jpg" alt="Mafia Boss">

                                 <div class="description">

                                   <h2>Wanted: Mafia Boss</h2>

                                   <p>

                                     <strong>Description:</strong> accused in organization of criminal association that terrorise peaceful citizens of the Foo town.

                                   </p>

 

                                   <p>

                                     <strong>Distinguishing marks:</strong>

                                     </p>

                                     <ul>

                                       <li>smokes big cigars;</li>

                                       <li>wears a luxurious suit (even while sleeping);</li>

                                       <li>rose buttonhole.</li>

                                     </ul>

                                   <p class="award">

                                     <strong>Award:</strong> 200 000$ for reliable location information.

                                   </p>

                                 </div>

                               </figure>

                             </li>

                             <li class="sw-slide">

                               <figure class="wanted sw-content">

                                 <img src="img/wanted2.jpg" alt="Mafia Boss">

                                 <div class="description">

                                   <h2>Wanted: Underboss</h2>

                                   <p>

                                     <strong>Description:</strong> accused in being extremely rude with the members of his gang, shooting on public and

                                     uncontrolled behaviour under the influence.

                                   </p>

 

                                   <p>

                                     <strong>Distinguishing marks:</strong>

                                     </p>

                                     <ul>

                                       <li>always smooth;</li>

                                       <li>carrying a gun;</li>

                                       <li>drinking too much Scotch.</li>

                                     </ul>

                                   <p class="award">

                                     <strong>Award:</strong> 1000$ for more information on this subject.

                                   </p>

                                 </div>

                               </figure>

                             </li>

                             <li class="sw-slide">

                               <figure class="wanted sw-content">

                                 <img src="img/wanted3.jpg" alt="Mafia Boss">

                                 <div class="description">

                                   <h2>Wanted: Big guy nickname 'Peewee'</h2>

                                   <p>

                                     <strong>Description:</strong> accused in littering, bad language.

                                   </p>

 

                                   <p>

                                     <strong>Distinguishing marks:</strong>

                                   </p>

                                   <ul>

                                     <li>extremely big;</li>

                                     <li>little vocabulary;</li>

                                     <li>bald.</li>

                                   </ul>

                                   <p class="award">

                                     <strong>Award:</strong> 700$ for teaching him some Good manners.

                                   </p>

                                 </div>

                               </figure>

                             </li>

                             <li class="sw-slide">

                               <figure class="wanted sw-content">

                                 <img src="img/wanted4.jpg" alt="Mafia Boss">

                                 <div class="description">

                                   <h2>Wanted: Cold blooded dude</h2>

                                   <p>

                                     <strong>Description:</strong> kills the audience with bad puns and pronounced eyebrows. 

                                   </p>

 

                                   <p>

                                     <strong>Distinguishing marks:</strong>

                                     </p>

                                     <ul>

                                       <li>carrying a blunt, plastic knife;</li>

                                       <li>wears napkin in right pocket;</li>

                                       <li>bold as a kneecap.</li>

                                     </ul>

                                   <p class="award">

                                     <strong>Award:</strong> 150 000$ for comedian courses for that person.

                                   </p>

                                 </div>

                               </figure>

                             </li>

                           </ul>

                         </figure>

                       </section>

                       <section>

                         <h3>Responsiveness</h3>

                         <p>Slider can resize itself with the window accordingly. Also image self resizing to fit slider.</p>

                         <figure id="responsiveness" class="swipslider">

                           <ul class="sw-slides">

                             <li class="sw-slide">

                               <img src="img/children_game_concept01.jpg" alt="Concept for children game">

                             </li>

                             <li class="sw-slide">

                               <img src="img/children_game_concept02.jpg" alt="Another Concept for children game">

                             </li>

                           </ul>

                         </figure>

                       </section>

                       <section>

                         <h3>Customizable</h3>

                         <p>Elements of slider can be easily customized.</p>

                         <figure id="customizability" class="swipslider">

                        <ul class="sw-slides">

                           <li class="sw-slide" style="background-color: #53c780">

                             <span class="slide-number">1</span>

                           </li>

                           <li class="sw-slide" style="background-color: #53c7b5">

                             <span class="slide-number">2</span>

                           </li>

                           <li class="sw-slide" style="background-color: #53b1c7">

                             <span class="slide-number">3</span>

                           </li>

                           <li class="sw-slide" style="background-color: #538dc7">

                             <span class="slide-number">4</span>

                           </li>

                           <li class="sw-slide" style="background-color: #535cc7">

                             <span class="slide-number">5</span>

                           </li>

                         </ul>

                         </figure>

                       </section>

                     </article>

                  

         </div>

         <div style="width: 100%; height: auto; line-height: 25px; text-align: center;">

                            </div>

         <script src="http://www.5iWEB.com.cn/statics/js/Jquery.1.7.1.min.js" type="text/javascript"></script>

        

         <script type="text/javascript" src="dist/swipeslider.min.js"></script>

         <script type="text/javascript">

                   $(window).load(function() {

                         $('#full_feature').swipeslider();

                         $('#content_slider').swipeslider({

                           transitionDuration: 600,

                           autoPlayTimeout: 10000,

                           sliderHeight: '300px'

                         });

                         $('#responsiveness').swipeslider();

                         $('#customizability').swipeslider({

                           transitionDuration: 1500,

                           autoPlayTimeout: 4000,

                           timingFunction: 'cubic-bezier(0.38, 0.96, 0.7, 0.07)',

                           sliderHeight: '30%'});

                       });

         </script>

</body>

</html>

关于“JavaScript怎么实现移动端手势滑动的幻灯片切换效果”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“JavaScript怎么实现移动端手势滑动的幻灯片切换效果”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注编程网VUE频道。

--结束END--

本文标题: JavaScript怎么实现移动端手势滑动的幻灯片切换效果

本文链接: https://lsjlt.com/news/94301.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
  • JavaScript怎么实现移动端手势滑动的幻灯片切换效果
    这篇文章主要介绍了JavaScript怎么实现移动端手势滑动的幻灯片切换效果的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇JavaScript怎么实现移动端手势滑动的幻灯片切换...
    99+
    2024-04-02
  • JavaScript怎么实现全屏幻灯片切换动画可拖拽
    这篇文章主要讲解了“JavaScript怎么实现全屏幻灯片切换动画可拖拽”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“JavaScript怎么实现全屏幻灯片...
    99+
    2024-04-02
  • vue移动端实现手指滑动效果
    本文实例为大家分享了vue移动端实现手指滑动效果的具体代码,供大家参考,具体内容如下 滑动时候黄色块宽度跟着变化 通过touch点击实现 目前感觉宽度变化有点问题,还在思考中 下...
    99+
    2024-04-02
  • AndroidFlutter实现图片滑动切换效果
    目录前言SlideTransition 介绍示例效果实现总结前言 我们开始来介绍转换类的动画组件,实际上这类转换动画组件也可以自己通过 AnimatedBuilder&nb...
    99+
    2024-04-02
  • JavaScript怎么实现流动图片切换效果
    这篇文章主要介绍“JavaScript怎么实现流动图片切换效果”,在日常操作中,相信很多人在JavaScript怎么实现流动图片切换效果问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大...
    99+
    2024-04-02
  • vue移动端实现手指滑动效果的方法
    本篇内容主要讲解“vue移动端实现手指滑动效果的方法”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“vue移动端实现手指滑动效果的方法”吧!本文实例为大家分享了vue移动端实现手指滑动效果的具体代...
    99+
    2023-06-20
  • JavaScript怎么实现左右全屏大图焦点图幻灯片切换效果
    这篇“JavaScript怎么实现左右全屏大图焦点图幻灯片切换效果”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下...
    99+
    2024-04-02
  • 原生javascript如何实现移动端滑动banner效果
    这篇文章给大家分享的是有关原生javascript如何实现移动端滑动banner效果的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。具体内容如下<!DOCTYPE ...
    99+
    2024-04-02
  • android左右滑动切换效果怎么实现
    在Android中,可以通过使用ViewPager组件来实现左右滑动切换效果。 首先,在XML布局文件中添加一个ViewPager组...
    99+
    2023-10-23
    android
  • Bootstrap中Carousel配合dropload.js如何实现移动端滑动切换图片
    这篇文章给大家分享的是有关Bootstrap中Carousel配合dropload.js如何实现移动端滑动切换图片的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编...
    99+
    2024-04-02
  • Android实现手势滑动多点触摸缩放平移图片效果
    现在app中,图片预览功能肯定是少不了的,用户基本已经形成条件反射,看到小图,点击看大图,看到大图两个手指开始进行放大,放大后,开始移动到指定部位。 一、概述 想要做到图片支持...
    99+
    2022-06-06
    图片 手势 Android
  • js如何实现移动端手指滑动轮播图效果
    这篇文章将为大家详细讲解有关js如何实现移动端手指滑动轮播图效果,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。如下所示:<!DOCTYPE html>...
    99+
    2024-04-02
  • jQuery实现类似滑动门切换效果的层切换
    复制代码 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3...
    99+
    2022-11-15
    滑动门 层切换
  • Android实现手势滑动多点触摸缩放平移图片效果(二)
    上一篇已经带大家实现了自由的放大缩小图片,简单介绍了下Matrix;具体请参考:Android实现手势滑动多点触摸缩放平移图片效果,本篇继续完善我们的ImageView。 首先...
    99+
    2022-06-06
    图片 手势 Android
  • Android怎么实现左右滑动切换图片
    这篇文章主要介绍“Android怎么实现左右滑动切换图片”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“Android怎么实现左右滑动切换图片”文章能帮助大家解决问题。简要说明本文采用ImageSwi...
    99+
    2023-06-30
  • html和css怎么实现图片滚动切换效果
    这篇文章主要介绍“html和css怎么实现图片滚动切换效果”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“html和css怎么实现图片滚动切换效果”文章能帮助大家解决问题。HTML:<!DOCT...
    99+
    2023-06-27
  • vue怎么实现移动端div拖动效果
    本文小编为大家详细介绍“vue怎么实现移动端div拖动效果”,内容详细,步骤清晰,细节处理妥当,希望这篇“vue怎么实现移动端div拖动效果”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。1、分享代码html代码&...
    99+
    2023-06-29
  • Android中怎么使用ViewPager2实现页面滑动切换效果
    这篇“Android中怎么使用ViewPager2实现页面滑动切换效果”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Andr...
    99+
    2023-06-29
  • Android开发之使用ViewPager实现图片左右滑动切换效果
    Android中图片的左右切换随处可见,今天我也试着查阅资料试着做了一下,挺简单的一个小Demo,却也发现了一些问题,话不多说,上代码~: 使用了3个xml文件作为ViewPa...
    99+
    2022-06-06
    图片 viewpager android开发 Android
  • vue怎么实现菜单栏滑动切换特效
    现代网页设计强调用户体验和交互性,让用户可以方便快捷地完成自己的目的。为了实现这一目标,很多网站都会采用滑动效果,例如点击菜单栏上的某个链接,网页就会平滑地滑动到相应位置,有效地提供了用户体验,提高了网站可用性。Vue.js作为一种流行的J...
    99+
    2023-05-14
软考高级职称资格查询
推荐阅读
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作