Swiper中文论坛
标题:
swiper报Swiper is not defined
[打印本页]
作者:
chengjunjian
时间:
2018-11-12 11:49
标题:
swiper报Swiper is not defined
<
div
class=
"swiper-container"
>
<
div
class=
"swiper-wrapper"
>
<
div
class=
"swiper-slide"
>
Slide 1
</
div
>
<
div
class=
"swiper-slide"
>
Slide 2
</
div
>
<
div
class=
"swiper-slide"
>
Slide 3
</
div
>
<
div
class=
"swiper-slide"
>
Slide 4
</
div
>
<
div
class=
"swiper-slide"
>
Slide 5
</
div
>
<
div
class=
"swiper-slide"
>
Slide 6
</
div
>
<
div
class=
"swiper-slide"
>
Slide 7
</
div
>
<
div
class=
"swiper-slide"
>
Slide 8
</
div
>
<
div
class=
"swiper-slide"
>
Slide 9
</
div
>
<
div
class=
"swiper-slide"
>
Slide 10
</
div
>
</
div
>
<!-- Add Pagination -->
<
div
class=
"swiper-pagination"
></
div
>
<!-- Add Arrows -->
<
div
class=
"swiper-button-next"
></
div
>
<
div
class=
"swiper-button-prev"
></
div
>
</
div
>
<!--
条目中可以是任意内容,如:
<img src=""> -->
</
div
>
<
script
>
var
swiper
=
new Swiper
(
'.swiper-container'
,
{
spaceBetween
:
30
,
centeredSlides
:
true
,
autoplay
:
{
delay
:
2500
,
disableOnInteraction
:
false
,
}
,
pagination
:
{
el
:
'.swiper-pagination'
,
clickable
:
true
,
}
,
navigation
:
{
nextEl
:
'.swiper-button-next'
,
prevEl
:
'.swiper-button-prev'
,
}
,
})
;
</
script
>
<
script
src=
"../../js/swiper.min.js"
type=
"text/javascript"
></
script
>
作者:
admin
时间:
2018-11-12 22:36
先加载文件试试
作者:
asdasdaaq
时间:
2018-11-23 18:48
引入js放 最上边试试
作者:
Lmniou
时间:
2018-11-24 11:07
没引入文件
作者:
wsg
时间:
2019-3-27 16:06
请问你是怎么解决的?
欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/)
Powered by Discuz! X3.2