使用插件实现不了功能

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

阿尔卑斯de秘密

2017-08-16 10:20:34

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="//cdn.bootcss.com/slick-carousel/1.6.0/slick-theme.css" rel="stylesheet">
<link href="//cdn.bootcss.com/slick-carousel/1.6.0/slick-theme.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/slick-carousel/1.6.0/slick.css" rel="stylesheet">
<link href="//cdn.bootcss.com/slick-carousel/1.6.0/slick.min.css" rel="stylesheet">

</head>

<body>

<div class="your-class">
    <div>your content</div>
    <div>your content</div>
    <div>your content</div>
</div>

<script src="jquery-3.2.1.js"></script>
<script src="http://cdn.bootcss.com/slick-carousel/1.6.0/slick.js"></script>
<script src="http://cdn.bootcss.com/slick-carousel/1.6.0/slick.min.js"></script>
<script>
	$(function () {
 		$('.your-class').slick({
     		infinite: true,
			slidesToShow: 3,
			slidesToScroll: 3
       });
    });
</script>
</body>
</html>

实现不了功能啊

写回答

1回答

小丸子爱吃菜

2017-08-16

http://climg.mukewang.com/5993b67d00011aaa14630153.jpg

如果我们在本地运行使用“协议省略”的URL可能不会得到如预期运行效果,由于我们在本地运行页面“协议省略”使用的基础协议是file,而不是http或https,所以一般来说我们在本地直接运行页面是无法正确获取到CDN的内容,所以当前学习阶段,还是要在前面加上http或者https。

祝学习愉快!

0

0 学习 · 36712 问题

查看课程