2017-04-24 8 views
1

カルーセルアニメーションをフェードイン/アウトまたは別のアニメーションに変更したいと思います。しかし、私はドキュメントで何かを見つけることができませんでした。反応ブートストラップカルーセルアニメーショントンフェージンを変更するには?

リアクションスティック以外のリアクションのための別のカルーセルライブラリを助けたり、提案したりすることはできますか? fadeクラスを追加

class Banner extends React.Component { 
 
    constructor(props){ 
 
    super(props); 
 
    this.state = { 
 
     index: 0, 
 
     direction: null, 
 
    } 
 
    } 
 

 
    handleSelect(selectedIndex, e) { 
 
    this.setState({ 
 
     index: selectedIndex, 
 
     direction: e.direction 
 
    }); 
 
    } 
 

 
    render() { 
 
    return (
 
     <div> 
 
     <Carousel activeIndex={this.state.index} direction={this.state.direction} onSelect={(i, e) =>this.handleSelect(i, e)}> 
 
      <Carousel.Item> 
 
      <img width={900} height={500} alt="900x500" src={images[0]}/> 
 
      <Carousel.Caption> 
 
       <h3>Second slide label</h3> 
 
       <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> 
 
      </Carousel.Caption> 
 
      </Carousel.Item> 
 
      <Carousel.Item> 
 
      <img width={900} height={500} alt="900x500" src={images[0]}/> 
 
      <Carousel.Caption> 
 
       <h3>Third slide label</h3> 
 
       <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p> 
 
      </Carousel.Caption> 
 
      </Carousel.Item> 
 
     </Carousel> 
 
     </div> 
 
    ); 
 
    } 
 
}

答えて

0

試してみてください。

<Carousel className="fade" activeIndex={this.state.index} direction={this.state.direction} onSelect={(i, e) =>this.handleSelect(i, e)}> 
関連する問題