Add custom buttons on Slick Carousel

前端 未结 11 676
迷失自我
迷失自我 2020-12-23 14:23

How do I apply custom prev and next buttons to slick carousel? I have tried a background image on the .slick-prev and .slick-next css classes. I ha

11条回答
  •  执念已碎
    2020-12-23 14:48

    If you are using sass you can simply set below mentioned variables to use icons provided by other fonts,

    $slick-font-family:FontAwesome;
    $slick-prev-character: "\f053";
    $slick-next-character: "\f054";
    

    These will change the font family used by slick's theme css and also the unicode for prev and next button. This example will use FontAwesome's chevron-left and chevron-right icons.

    Other sass variables which can be configured are given in Slick Github page

提交回复
热议问题