Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

carousel - How do I modify the interval speed?

This question is for this component: https://ant.design/components/carousel/#header

I have attempted autoplayInterval={1000} to no success.


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

1 Answer

0 votes
by (71.8m points)

autoPlaySpeed is the prop that you want. You can set autoPlaySpeed={1000}, default value is 3000ms. The carousel component demo uses 'react-slick' and here is the reference for autoPlaySpeed, you can also check rest of additional API's for this plugin. Check this code snippet.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...