andyyou / react-coverflow

A Coverflow effect component of React version made for the web.
http://andyyou.github.io/react-coverflow/
MIT License
347 stars 142 forks source link

how can i make custom?? #98

Open Trapa-Eureka opened 3 years ago

Trapa-Eureka commented 3 years ago

` <div onClick={() => fn()} onKeyDown={() => fn()} role="menuitem" tabIndex="0"> <img src='[image/path/please_change]' alt='title or description' style={{ display: 'block', width: '100%' }}/>

title or description
<img src='[image/path/please_change]' alt='title or description' data-action="http://andyyou.github.io/react-coverflow/"/>

`

  1. How can I change from 'width={960}' to like px or percent?
  2. I tried to decorate it with 'div' instead of 'img', but it doesn't appear on the screen. How do I make it appear on the screen?
GD0910 commented 1 year ago

<Coverflow width={960} height={480} displayQuantityOfSide={2} navigation={false} enableHeading={false}> <div onClick={() => fn()} onKeyDown={() => fn()} role="menuitem" tabIndex="0"> <img src='[image/path/please_change]' alt='title or description' style={{ display: 'block', width: '100%' }}/> </div> <img src='[image/path/please_change]' alt='title or description' data-action="http://andyyou.github.io/react-coverflow/"/> <img src='[image/path/please_change]' alt='title or description' data-action="http://andyyou.github.io/react-coverflow/"/> </Coverflow>

  1. How can I change from 'width={960}' to like px or percent?
  2. I tried to decorate it with 'div' instead of 'img', but it doesn't appear on the screen. How do I make it appear on the screen?

go to vscode or any ide and copy the relative path of the image and put it in inverted comma ig this should solve the referencing part