Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
397 views
in Technique[技术] by (71.8m points)

Ionic-react carousel with ionic slides

In Ionic-React how to create a carousel with ionic slides and want to use it inside the IonList, so the image can be a thumbnail or avatar. I tried changing the CSS but with no luck and also autoplay is not working.

Want to use it purely in ionic so that it can be accessed on mobile as well.


  const slideOptsOne = {
    initialSlide: 0,
    slidesPerView: 1,
    autoplay: true
  };


        <IonList>
          <IonItem>
            <IonSlides pager={true} options={slideOptsOne}>
              <IonSlide>
              <IonThumbnail slot="start">
                  <img src="image source" className="divSlide"/>
                  </IonThumbnail>
              </IonSlide>
              <IonSlide>
              <IonThumbnail slot="start">
                  <img src="image source" />
              </IonThumbnail>
              </IonSlide>
            </IonSlides>
            <IonLabel>
              <h5>Finn</h5>
              <h6>I'm a big deal</h6>
              <p>Listen, I've had a pretty messed up day...</p>
            </IonLabel>
            <IonLabel>
              <p>Finn</p>
              <p>I'm a big deal</p>
            </IonLabel>
          </IonItem>

          <IonItem>
            <IonSlides pager={true} options={slideOptsOne}>
              <IonSlide>
              <IonThumbnail slot="start">
                  <img src="image source" className="divSlide"/>
                  </IonThumbnail>
              </IonSlide>
              <IonSlide>
              <IonThumbnail slot="start">
                  <img src="image source" />
              </IonThumbnail>
              </IonSlide>
            </IonSlides>
            <IonLabel>
              <h5>Han</h5>
              <h6>Look, kid...</h6>
              <p>I've got enough on my plate as it is, and I...</p>
            </IonLabel>
            <IonLabel>
              <p>Finn</p>
              <p>I'm a big deal</p>
            </IonLabel>
            <IonLabel>
              <h5>Han</h5>
              <h6>Look, kid...</h6>
              <p>I've got enough on my plate as it is, and I...</p>
            </IonLabel>
          </IonItem>
        </IonList>

question from:https://stackoverflow.com/questions/65647306/ionic-react-carousel-with-ionic-slides

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...