我正在使用ion-popover。
在文档中的示例中,当您单击右上角的三个点时,弹出框显示在单击的按钮旁边。
重现这种情况的好方法是什么?有没有内置的方法?
由于我没有找到方法,我试图手动设置弹出框的样式,但这也不起作用。
我的页面.ts
const popover = await this.popoverController.create({
component: OptionsComponent,
cssClass: 'my-custom-class',
event: ev
});
return await popover.present();
Run Code Online (Sandbox Code Playgroud)
我的global.scss
.my-custom-class .popover-content {
position: absolute;
right: 0;
top: 0;
}
Run Code Online (Sandbox Code Playgroud)
难道我做错了什么?有没有更好的方法来解决这个问题?
我最近直接从 3 更新到 bootstrap 5。是的,我跳过了 4。
事情是这样的,早在 3 年前,我就做过这样的事情。
<i class="glyphicon glyphicon-asterisk"></i>
<style> i:hover { font-weight: bold; } </style>
Run Code Online (Sandbox Code Playgroud)
现在,使用 bootstrap5 的图标,这是行不通的!
显然,我现在正在使用新图标。
<i class="bi bi-asterisk"></i>
<style> i:hover { font-weight: bold; } </style>
Run Code Online (Sandbox Code Playgroud)
但正如我所说,这是行不通的。
为什么?有办法实现这一点吗?