简体   繁体   English

反应流畅的修改

[英]React-slick modifications

I'm using react-slick and I'd like to add some features to my slider. 我正在使用react-slick,我想在滑块中添加一些功能。 I need some help to disable the left arrow on the initial state of the slider, since the slider is infinite. 我需要一些帮助来禁用滑块初始状态上的向左箭头,因为滑块是无限的。 Also, I'm displaying 3 elements and I want to add a gradient mask on the 3rd one (the one that is following the current slide - the current slider has class slick-active). 另外,我正在显示3个元素,并且我想在第3个元素上添加一个渐变蒙版(当前幻灯片之后的元素-当前滑块的类为slick-active)。

I'm thinking about using jQuery but since this is not a good practice, any feedback would be appreciated. 我正在考虑使用jQuery但由于这不是一个好习惯,因此希望您能提供任何反馈意见。

React-slick: https://react-slick.neostack.com React-slick: https : //react-slick.neostack.com

If you choose to use a slider that is not infinite, on the initial state the left arrow is disabled (class 'slick-disabled'). 如果选择使用无限滚动条,则在初始状态下禁用左箭头(“ slick-disabled”类)。 To hide it you can use CSS. 要隐藏它,您可以使用CSS。 For the second one you can use the 'afterChange' prop ( This is an example ). 对于第二个,您可以使用“ afterChange”道具( 这是一个示例 )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM