占据所有图片中类的总高和总宽
Occupy the total height and width of the classes in all images
问题:
我创建了一个图像滑块,但是我的问题是我无法填充下拉和 abc 的宽度和总高度 (100%) 类。
问题:
如何让所有图像占据整个区域而不损失其质量?
代码
<div class="col-md-6" style="overflow-y: auto;">
<div class="drosp">
<div class="c">
<ng-template>
<ngb-carousel id="carousel" #carouse *ngIf="imagens" >
<ng-template *ngFor="let imgIdx of imagens; let i = index" [id]="i" ngbSlide>
<div class="picsum-img-wrapper">
<img [src]="imgIdx.Imagem" class="img-responsive">
</div>
</ng-template>
</ngb-carousel>
</ng-template>
</div>
</div>
能不能试试改一下:
<img class="img-responsive" [src]="imgIdx.Imagem" style="width: 100%; height: 100%; border-radius: 8px;">
收件人:
<img [src]="imgIdx.Imagem" style="height: 100%; width: auto; border-radius: 8px;">
尝试添加这些样式:
ngb-carousel,
:host ::ng-deep ngb-carousel .carousel-inner,
:host ::ng-deep ngb-carousel .carousel-item,
:host ::ng-deep ngb-carousel .picsum-img-wrapper {
height: 100%;
}
.img-responsive {
obejct-fit: cover;
}
问题:
我创建了一个图像滑块,但是我的问题是我无法填充下拉和 abc 的宽度和总高度 (100%) 类。
问题:
如何让所有图像占据整个区域而不损失其质量?
代码
<div class="col-md-6" style="overflow-y: auto;">
<div class="drosp">
<div class="c">
<ng-template>
<ngb-carousel id="carousel" #carouse *ngIf="imagens" >
<ng-template *ngFor="let imgIdx of imagens; let i = index" [id]="i" ngbSlide>
<div class="picsum-img-wrapper">
<img [src]="imgIdx.Imagem" class="img-responsive">
</div>
</ng-template>
</ngb-carousel>
</ng-template>
</div>
</div>
能不能试试改一下:
<img class="img-responsive" [src]="imgIdx.Imagem" style="width: 100%; height: 100%; border-radius: 8px;">
收件人:
<img [src]="imgIdx.Imagem" style="height: 100%; width: auto; border-radius: 8px;">
尝试添加这些样式:
ngb-carousel,
:host ::ng-deep ngb-carousel .carousel-inner,
:host ::ng-deep ngb-carousel .carousel-item,
:host ::ng-deep ngb-carousel .picsum-img-wrapper {
height: 100%;
}
.img-responsive {
obejct-fit: cover;
}