如何在reactjs中为多个图像使用react-slick滑块

时间:2017-11-01 07:22:11

标签: css reactjs

I dont want like that output 怎么做。我正在开发但是没有调整 const settings = {       无限:真的,       slidesToShow:3,       slidesToScroll:3,     }; <div > <Slider {...settings} > <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', marginTop:'10px', marginBottom: '10px', marginLeft: '15%', }}> <div><img width= '200px' height= '200px' src='/assets/images/oem/main/apple-iphone-5s-small.png'/></div> <div><img width= '200px' height= '200px' src='/assets/images/oem/main/Apple.png' /></div> <div><img width= '200px' height= '200px' src='/assets/images/oem/main/apple-iphone-5s-big.png' /></div> <div><img width= '200px' height= '200px' src='/assets/images/oem/main/apple-iphone-5s-small.png' /></div> </div>                                                                                                                             

1 个答案:

答案 0 :(得分:1)

您是否看过Multiple Items Example(视觉here)? 如果要一次显示3个图像,请将设置更改为:

slidesToShow: 3,
slidesToScroll: 3