如何在 ionic 4 的离子菜单上应用 border-radius css 属性?

How to apply border-radius css property on ion-menu in ionic 4?

我正在创建 Ionic 4 Angular 应用程序,在该应用程序中我使用 ion-menu 来显示菜单项。如何在 ion-menu 上应用 border-top-right-radius 和 border-bottom-right-radius css 属性?下图显示了我想要的。 Here is ion-menu documentation link.

你试过吗?

.ion-item-border {
 border-radius: 20px !important;
 padding-left: 10px;
 padding-right: 10px;
 padding-bottom: 5px;
 padding-top: 5px; 
}

你认为这实现了你想要的:

global.scss

ion-menu{
    --ion-toolbar-background: grey;
    ion-list{
         border: 2px solid grey !important;
    padding: 10px !important;
    border-top-right-radius: 25px !important;
    border-bottom-right-radius: 25px !important;
    background: grey !important;


    }
    ion-item{
        --background: grey !important;
        --color: #fff;
    }
}