[软件设计/软件工程] materialzile.css 转盘在移动设备上不起作用

[复制链接]
发表于 2022-5-3 10:11:16
问题
这是我的代码:
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7.     <title>Document</title>
  8.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
  9. </head>
  10. <body>
  11.     <div class="carousel carousel-slider center" data-indicators="true">
  12.         <div class="carousel-fixed-item center">
  13.             <a class="btn waves-effect white grey-text darken-text-2">button</a>
  14.         </div>
  15.         <div class="carousel-item red white-text" href="#one!">
  16.             <h2>First Panel</h2>
  17.             <p class="white-text">This is your first panel</p>
  18.         </div>
  19.         <div class="carousel-item amber white-text" href="#two!">
  20.             <h2>Second Panel</h2>
  21.             <p class="white-text">This is your second panel</p>
  22.         </div>
  23.         <div class="carousel-item green white-text" href="#three!">
  24.             <h2>Third Panel</h2>
  25.             <p class="white-text">This is your third panel</p>
  26.         </div>
  27.         <div class="carousel-item blue white-text" href="#four!">
  28.             <h2>Fourth Panel</h2>
  29.             <p class="white-text">This is your fourth panel</p>
  30.         </div>
  31.     </div>
  32.     <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
  33.     <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
  34.     <script>
  35.         $(document).ready(function () {
  36.             $('.carousel.carousel-slider').carousel({ fullWidth: true });
  37.         });
  38.     </script>
  39. </body>
  40. </html>
复制代码

它基本上是官方文档的复制粘贴,它在我的桌面上运行良好,但在移动设备上运行良好(我在 Android 上)。轮播正在显示,但是当我滑动它时没有任何反应。

官方文档页面 http://materialecss.com/carousel.html 中的示例轮播在我的移动设备上运行良好。

回答
我认为您使用的是旧的 jquery 版本。尝试使用 jquery-3.2.1





上一篇:禁用保留列表的最有效数据结构
下一篇:Jquery 数据表到响应数据表

使用道具 举报

Archiver|手机版|小黑屋|吾爱开源 |网站地图

Copyright 2011 - 2012 Lnqq.NET.All Rights Reserved( ICP备案粤ICP备14042591号-1粤ICP14042591号 )

关于本站 - 版权申明 - 侵删联系 - Ln Studio! - 广告联系

本站资源来自互联网,仅供用户测试使用,相关版权归原作者所有

快速回复 返回顶部 返回列表