我有一个带有布尔玛CSS卡的光滑滑块。直到我到达断点并将我的slidesToShow设置为其他数字时,它才起作用。卡由标题和内容主体组成。到达断点时,卡头和主体是独立的幻灯片。
slideConfig = {
'slidesToShow': 4,
'slidesToScroll': 1,
'arrows': true,
'swipeToSlide': true,
'infinite': false,
'responsive': [
{
'breakpoint': 767,
'slidesToShow': 3
}
]
};
HTML:
<ngx-slick class="carousel" #slickModal="slick-modal" [config]="slideConfig" responsive="breakpoints">
<div ngxSlickItem *ngFor="let slide of slides" class="slide">
<div class="card">
<header class="card-header">
<p class="card-header-title">
Box {{slide}}
</p>
</header>
<div class="card-content">
<div class="content">
<p>Content for slide {{slide}}</p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</div>
</div>
</div>
</div>
</ngx-slick
答案 0 :(得分:0)
尝试
'responsive': [
{
'breakpoint': 767,
'settings': {
'slidesToShow': 3
}
}
]