Nuka Carousel heightMode don't work in react

懵懂的女人 提交于 2019-12-11 04:55:47

问题


I have a nuka carousel with 3 slides and the height of the slides depends on the size of the content. So if one slide has 5 rows of text and another has 6 rows of text the one will be higher than the other.

So to fix this I found a heightMode prop where the slides height will be set after the tallest slide but when I test locally it doesn't do anything.

Is there any way to change slideHeight manually?

Does anybody know if heightMode prop is working or not?


回答1:


I also encountered this problem and here's my fix. I Just added some css code:

.slider-list {
    height: auto!important;
}

.slider-slide {
    position: sticky!important;
}


来源:https://stackoverflow.com/questions/41468628/nuka-carousel-heightmode-dont-work-in-react

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!