How to style prev/next arrows button?

前端 未结 4 836
-上瘾入骨i
-上瘾入骨i 2021-02-05 11:30

GOAL

I\'ve been trying to modify the slick.css to fit the style I need in my site. I got the slick.css

4条回答
  •  甜味超标
    2021-02-05 12:26

    The Basic thing is its producing arrows by content property:

    .slick-prev:before, .slick-next:before { font-family: "slick"; font-size: 40px; line-height: 1; color: red; opacity: 0.75; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }   
    
    .slick-prev:before { content: "‹"; }
    [dir="rtl"] .slick-prev:before { content: "›"; }
    
    [dir="rtl"] .slick-next { left: -10px; top: 70px; right: auto; }
    .slick-next:before { content: "›"; }
    [dir="rtl"] .slick-next:before { content: "‹"; }

    Replace these classes and after that just play with margin and positions properties to adjust the arrows, if this didnot fix the issue send me the http://jsfiddle.net/ link i will send you the complete solution.

    If want to use Font Awesome

    .slick-prev:before, .slick-next:before { font-family: FontAwesome; font-size: 40px; line-height: 1; color: red; opacity: 0.75; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }   
    
    .slick-prev:before { content: "\f053"; }
    [dir="rtl"] .slick-prev:before { content: "\f054"; }
    
    [dir="rtl"] .slick-next { left: -10px; top: 70px; right: auto; }
    .slick-next:before { content: "\f054"; }
    [dir="rtl"] .slick-next:before { content: "\f053"; }

    For list of Font icons visit http://astronautweb.co/snippet/font-awesome/ and how to implement the font visit this thread Use font awesome icon as css content

提交回复
热议问题