1-4问题3

来源:1-4 如何使用插件

慕丝6937110

2018-12-25 00:14:38

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>demo</title>
    <link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/gh/kenwheeler/slick@1.9.0/slick/slick.css"/>
<!-- Add the slick-theme.css if you want default styling -->
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/gh/kenwheeler/slick@1.9.0/slick/slick-theme.css"/>
</head>

<body>
    <div class="your-class">
    <div>your content1</div>
    <div>your content2</div>
    <div>your content3</div>
   </div>

    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <script type=text/javascript src=//cdn.jsdelivr.net/gh/kenwheeler/slick@1.9.0/slick/slick.min.js></script>
    <script>
   
     $('your-class').slick({
     dots:true,
     infinite:true,
     speed:300,
     slidesToShow:1,
     adaptiveHeight:true
     });
    </script>
</body>

</html>

按老师上课的样子,自己写了一模一样的代码,为什么无法运行呢????

目前插件代码都看不懂写的是什么,无脑复制黏贴,一头雾水

写回答

1回答

山河远阔ZZ

2018-12-25

同学你好,经过测试,slick的链接是错误的,你可以在bootcdn里面去找slick的链接,下面是bootcdn的官网:

https://www.bootcdn.cn/

然后再去搜索slick官网:http://kenwheeler.github.io/slick/  去查看各项配置,参考下图:

http://img.mukewang.com/climg/5c21aba900015feb11820923.jpg

英文看不懂的话,可以使用谷歌浏览器翻译。

希望解决了你的疑问,祝学习愉快,望采纳!

0

0 学习 · 36712 问题

查看课程