光滑的carrusel箭头没有显示

时间:2016-01-27 22:02:21

标签: slick.js arrows

我通过shopify http://kids.sevenly.org托管我公司的商店,光滑的carrusel看起来很棒,但我无法显示箭头。任何人都可以帮助我,我已经尝试了一切,它让我疯了。



@charset 'UTF-8';
/* Slider CSS-theme */
.slick-loading .slick-list
{
    background: #fff url('./ajax-loader.gif') center center no-repeat;
}

/* Icons */
@font-face
{
    font-family: 'slick';
    font-weight: normal;
    font-style: normal;

    src: url('./fonts/slick.eot');
    src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg');
}
/* Arrows */

.slick-prev:after {
  content: ">";
  color: red;
  font-size: 30px;
}
.slick-next:before {
  content: "<"
  color: red;
  font-size: 30px;
}

<!--.slick-prev:before, .slick-next:before{
    color: white;-->

    font-size: 0;
    line-height: 0;

    position: absolute;
    top: 50%;

    display: block;

    width: 20px;
    height: 20px;
    margin-top: -10px;
    padding: 0;

    cursor: pointer;

    color: white;
    border: white;
    outline: white;
    background: white;
}
.slick-prev:hover,
.slick-prev:focus,
.slick-next:hover,
.slick-next:focus
{
    color: white;
    outline: none;
    background: transparent;
}
.slick-prev:hover:before,
.slick-prev:focus:before,
.slick-next:hover:before,
.slick-next:focus:before
{
    opacity: 1;
}
.slick-prev.slick-disabled:before,
.slick-next.slick-disabled:before
{
    opacity: .25;
}

.slick-prev:before,
.slick-next:before
{
    font-family: 'slick';
    font-size: 20px;
    line-height: 1;

    opacity: .75;
    color: white;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.slick-prev
{
    left: 40px;
}
[dir='rtl'] .slick-prev
{
    right: 40px;
    left: auto;
}
.slick-prev:before
{
    content: '←';
}
[dir='rtl'] .slick-prev:before
{
    content: '→';
}

.slick-next
{
    right: 40px;
}
[dir='rtl'] .slick-next
{
    right: auto;
    left: 40px;
}
.slick-next:before
{
    content: '→';
}
[dir='rtl'] .slick-next:before
{
    content: '←';
}

/* Dots */
.slick-slider
{
    margin-bottom: 30px;
}

.slick-dots
{
    position: absolute;
    bottom: -45px;

    display: block;

    width: 100%;
    padding: 0;

    list-style: none;

    text-align: center;
}
.slick-dots li
{
    position: relative;

    display: inline-block;

    width: 20px;
    height: 20px;
    margin: 0 5px;
    padding: 0;

    cursor: pointer;
}
.slick-dots li button
{
    font-size: 0;
    line-height: 0;

    display: block;

    width: 20px;
    height: 20px;
    padding: 5px;

    cursor: pointer;

    color: transparent;
    border: 0;
    outline: none;
    background: transparent;
}
.slick-dots li button:hover,
.slick-dots li button:focus
{
    outline: none;
}
.slick-dots li button:hover:before,
.slick-dots li button:focus:before
{
    opacity: 1;
}
.slick-dots li button:before
{
    font-family: 'slick';
    font-size: 6px;
    line-height: 20px;

    position: absolute;
    top: 0;
    left: 0;

    width: 20px;
    height: 20px;

    content: '•';
    text-align: center;

    opacity: .25;
    color: black;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.slick-dots li.slick-active button:before
{
    opacity: .75;
    color: black;
}
&#13;
/* Slider SLICK.CSS */
.slick-slider
{
    position: relative;

    display: block;

    -moz-box-sizing: border-box;
         box-sizing: border-box;

    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;

    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -ms-touch-action: pan-y;
        touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

.slick-list
{
    position: relative;

    display: block;
    overflow: hidden;

    margin: 0;
    padding: 0;
}
.slick-list:focus
{
    outline: none;
}
.slick-list.dragging
{
    cursor: pointer;
    cursor: hand;
}

.slick-slider .slick-track,
.slick-slider .slick-list
{
    -webkit-transform: translate3d(0, 0, 0);
       -moz-transform: translate3d(0, 0, 0);
        -ms-transform: translate3d(0, 0, 0);
         -o-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
}

.slick-track
{
    position: relative;
    top: 0;
    left: 0;

    display: block;
}
.slick-track:before,
.slick-track:after
{
    display: table;

    content: '';
}
.slick-track:after
{
    clear: both;
}
.slick-loading .slick-track
{
    visibility: hidden;
}

.slick-slide
{
    display: none;
    float: left;

    height: 100%;
    min-height: 1px;
}
[dir='rtl'] .slick-slide
{
    float: right;
}
.slick-slide img
{
    display: block;
}
.slick-slide.slick-loading img
{
    display: none;
}
.slick-slide.dragging img
{
    pointer-events: none;
}
.slick-initialized .slick-slide
{
    display: block;
}
.slick-loading .slick-slide
{
    visibility: hidden;
}
.slick-vertical .slick-slide
{
    display: block;

    height: auto;

    border: 1px solid transparent;
}
.slick-arrow.slick-hidden {
    display: block;
}
&#13;
&#13;
&#13;

&#13;
&#13;
<!--Slick Initialize -->
<script type="text/javascript">
  $(document).ready(function(){
    $('.fade').slick({
      dots: true,
      infinite: true,
      speed: 2000,
      fade: true,
      cssEase: 'linear',
      slidesToShow: 1,
      prevArrow: true,
      nextArrow: true,
      lazyLoad: 'ondemand',
      autoplay: true
    });

    $('.lazy').slick({
      lazyLoad: 'ondemand',
      slidesToShow: 1,
      slidesToScroll: 1
    });
  });
</script>
&#13;
&#13;
&#13;

&#13;
&#13;
class EXAMPLEUNMANAGEDDLL_API CUnmanagedTestClass
{
public:
    CUnmanagedTestClass();
    virtual ~CUnmanagedTestClass();
}; 
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

您的光滑配置不正确。如果prevArrow设置为true,则nextArrowarrows设置为true。 prevArrownextArrow用于自定义上一个和下一个箭头的HTML。

您应该使用以下内容:

<!--Slick Initialize -->
<script type="text/javascript">
  $(document).ready(function(){
    $('.fade').slick({
      dots: true,
      infinite: true,
      speed: 2000,
      fade: true,
      cssEase: 'linear',
      slidesToShow: 1,
      arrows: true,
      lazyLoad: 'ondemand',
      autoplay: true
    });

    $('.lazy').slick({
      lazyLoad: 'ondemand',
      slidesToShow: 1,
      slidesToScroll: 1
    });
  });
</script>

以下是将来参考的文档:http://kenwheeler.github.io/slick/