如何在幻灯片底部放置一个按钮 - Ionic
How to position a button at the bottom of a slide - Ionic
我有以下图片幻灯片:
<ion-slides style="margin-top: 30px; margin-bottom: 30px" pager="true" [options]="slideOpts">
<ion-slide *ngFor="let image of imageURLs">
<div (click)="openZoomedImage(image.fullURL)">
<img [src]="image.fullURL" alt=”slide-1”/>
</div>
<ion-button size="small" color="danger" (click)="deleteImage(image.imageName)">Delete</ion-button>
</ion-slide>
</ion-slides>
但是我想知道如何为幻灯片底部的每张图片制作删除按钮?
谢谢
将其包裹在 div 中并使用 css.
.selector{
position: absolute;
bottom: 0;
right: 10px;
}
此 css 会将您的按钮发送到右下角。
检查此 stackblitz 以获取演示:
我有以下图片幻灯片:
<ion-slides style="margin-top: 30px; margin-bottom: 30px" pager="true" [options]="slideOpts">
<ion-slide *ngFor="let image of imageURLs">
<div (click)="openZoomedImage(image.fullURL)">
<img [src]="image.fullURL" alt=”slide-1”/>
</div>
<ion-button size="small" color="danger" (click)="deleteImage(image.imageName)">Delete</ion-button>
</ion-slide>
</ion-slides>
但是我想知道如何为幻灯片底部的每张图片制作删除按钮?
谢谢
将其包裹在 div 中并使用 css.
.selector{
position: absolute;
bottom: 0;
right: 10px;
}
此 css 会将您的按钮发送到右下角。
检查此 stackblitz 以获取演示: