【发布时间】:2020-03-19 10:04:02
【问题描述】:
我正在使用 ng-bootstrap 创建轮播,我想将箭头颜色或图像从白色更改为黑色,因为我有白色背景图像并且它们是不可见的。我的问题是我无法跨度,我不知道如何在 scss 中调用它。我将 bootstrap 4 和 ng-bootstrap 用于角度 https://ng-bootstrap.github.io/#/components/carousel/examples。当我在控制台中更改图像网址时,它可以工作。我试图直接获得箭头但没有任何反应。
我的代码:
<div class="col-lg-6">
<div class="imageCarousel">
<ng-container *ngIf="product.images">
<ngb-carousel>
<ng-template id="imageSlide" ngbSlide *ngFor="let image of product.images | slice: 1">
<img [src]="image">
</ng-template>
</ngb-carousel>
</ng-container>
</div>
</div>
scss:
.imageCarousel {
max-height: 500px;
text-align: center;
color: $color2;
.carousel .slide {
width: 50px;
height: 50px;
background-image: url("https://storage.googleapis.com/staging.pc-shop-260af.appspot.com/ic_keyboard_arrow_right_black_24px.svg");
}
img {
// border: 2px solid blue;
max-width: 100%;
max-height: 400px;
}
}
【问题讨论】:
标签: html sass bootstrap-4