javascript - 如何在 carousal 中设置过渡效果(react)
问题描述
我正在尝试使用材质 UI 在我的 React 应用程序中添加一个不错的过渡效果。我准备了这个轮播,我很难在其中为用户体验提供平滑的幻灯片效果。
<div>
{this.state.images.length !== 0 &&
<div>
<div style={{ display: 'flex', justifyContent: 'center', margin: 5}}>
<img src={`${this.state.host}${this.state.path}${this.state.images[this.state.currentImage]}`} alt='nope' style={{ width: '100%', height: '300px', position: 'absolute' }} />
<div style={{ display: 'flex', justifyContent: 'space-between', width: '100%', height: '300px',alignItems:'center' }}>
<IconButton onClick={this.prevSlide.bind(this)}><ChevronLeft color="inherit"/></IconButton>
<IconButton onClick={this.nextSlide.bind(this)}><ChevronRight color="inherit" /></IconButton>
</div>
</div>
</div>}
</div>
解决方案
推荐阅读
- javascript - 三星电视对 LAN 唤醒没有反应
- c# - 如何从剃刀页面读取正文?进程一直挂起
- mongodb - 在聚合管道中使用索引的问题
- ios - 领域:获取具有列表属性选择的对象
- c# - 表达式参数参考
- ms-access - 使用 Access 2016 中的表创建查询时,仅保留长文本字段的前 255 个字符
- apache-spark - Spark : Union 只能在具有兼容列类型的表上执行。结构
!= 结构 - html - 无法读取未定义离子 3 的属性“有错误”
- azure - VSTS Drop Single Artifact - 发布到 Azure 多个网站
- ios - segue 后更新类属性中的数组