简体   繁体   中英

Ionic 5 - how to modify ion-button expand=“block” width

I have this line

<ion-button expand="block" id="create" shape="round">Create Account</ion-button>

I would like to increase the width of this button. I can't find any way to increase the button height and width. I have tried to use an id. That didn't do anything.

#create {
    --width: 250px;
    --height: 120px;
}

You are using invalid css properties ( --width and --heigth ). I think you are looking for height and width .

#create {
    width: 250px;
    height: 120px;
}

I'm new to ionic, but you should try with <ion-content> <ion-button></ion-button> </ion-content>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM