我有一个警告,我有一些文字和一个ionicon,我想改变它的颜色,并调整其大小和位置(中心),我创建了一个css类试图应用它,但它不起作用,甚至认为HTML似乎工作,我用<b>
标签就好了。
我的代码:
async presentAlertError(data) {
const alert = await this.alertController.create({
header: 'Confirmation',
message: '<ion-icon name="close" class="custom-icon-notfound" > </ion-icon>' + "Registration " + data.statusText,
buttons: [
{
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: (aux) => {
console.log('Confirm Cancel: aux');
}
}, {
text: 'Scan Next',
handler: () => {
this.scanCode();
console.log('Confirm ');
}
}
]
});
await alert.present()
我应该以不同的方式做到这一点吗?