Add custom buttons on Slick Carousel

前端 未结 11 694
迷失自我
迷失自我 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

    That's because they use an icon font for the buttons. They use "Slick" font as you can see in this image:

    enter image description here

    Basically, the make the letter "A" the form of an icon, the letter "B" the form of another one and so on.

    For example:

    enter image description here

    If you want to know more about icon fonts click here

    If you want to change the icons, you need to replace the whole button code or you can go to www.fontastic.me and create your own icon font. After that, replace the font file for the current one and you'll have your own icon.

提交回复
热议问题