react-image-gallery是一款支持缩略图的实用性图片预览组件,具备自动播放的功能,以及大量的自定义配置,属于比较实用一类的组件!
https://github.com/xiaolin/react-image-gallery
React Image Gallery需要React 16.0.0或更高版本。
npm install react-image-gallery
# SCSS
@import "~react-image-gallery/styles/scss/image-gallery.scss";
# CSS
@import "~react-image-gallery/styles/css/image-gallery.css";
import ImageGallery from 'react-image-gallery';
const images = [
{
original: '原图地址1',
thumbnail: '缩略图地址1',
},
{
original: '原图地址2',
thumbnail: '原图地址2',
},
{
original: '原图地址3',
thumbnail: '原图地址3',
},
];
class MyGallery extends React.Component {
render() {
return ;
}
}
轮播图幻灯片
页面更新:2024-03-22
本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828
© CopyRight 2020-2024 All Rights Reserved. Powered By 71396.com 闽ICP备11008920号-4
闽公网安备35020302034903号