ask for advice, when I use react-id-swiper, I will not show the effect of swiping like the official website demo, but all div will be squeezed into the first block?
reference
official website codepen code: https://codepen.io/stinaq/pen.
npm react-id-swiper: https://www.npmjs.com/package.
github react-id-swiper: https://github.com/kidjp85/re.
react-id-swiper effect demo: http://kidjp85.github.io/reac.
Picture
Code
class SwiperDemo extends Component {
constructor(props) {
super(props)
this.state = {
}
}
render() {
const params = {
pagination: {
el: ".swiper-pagination",
type: "bullets",
clickable: true
},
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev"
},
spaceBetween: 30
}
return (
<div>
<ReactIdSwiper {...params}>
<div className="slide1">Slide 1</div>
<div className="slide2">Slide 2</div>
<div>Slide 3</div>
<div>Slide 4</div>
<div>Slide 5</div>
</ReactIdSwiper>
</div>
);
}
}
/ / export default swiper demo
export default SwiperDemo