我想在不影响其他元素的情况下更改 ionic 元素中特定弹出窗口的宽度。
var alertPopup = $ionicPopup.alert({
cssClass: 'popupg',
title: coe,
template: text
});
最佳答案
如果您使用的是 Ionic 3
在你的 .ts 文件上:
const alert = await this.alertCtrl.create({
header: 'Sorry',
cssClass: 'my-custom-alert',
message: 'message',
buttons: ['Find by name ?']
});
在你的 global.scss 上
.my-custom-alert .alert-wrapper {
min-width: 450px !important;
}
样式后弹出(最小宽度:450 像素)
希望对您有所帮助:)
关于html - 更改 ionic 弹出窗口的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40111073/