仅工具栏外的离子4圆形图标按钮/离子按钮 [英] Ionic 4 round icon only button outside of toolbar/ion-buttons
本文介绍了仅工具栏外的离子4圆形图标按钮/离子按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ion-buttons
时得到的样式的按钮,并且只有图标按钮(例如,清晰和圆形)。
我到目前为止的代码:
<ion-button icon-only shape="round" color="white" fill="clear">
<ion-icon slot="icon-only" name="close"></ion-icon>
</ion-button>
结果按钮不是圆形的,它只是一个圆角的矩形按钮。
Ionic 4文档未提及如何执行此操作。
推荐答案
FabButton将工作.但这里是我如何使用离子组件在一个reactjs应用程序中做到这一点的,只需使用角度版本,您应该会得到相同的结果
<IonCard>
<IonToolbar>
<IonTitle>Test</IonTitle>
<IonButtons slot="end">
<IonButton
style={{
backgroundColor: "red",
borderRadius: "100%",
color: "white",
width: 32
}}
>
<IonIcon icon={close}></IonIcon>
</IonButton>
</IonButtons>
</IonToolbar>
<IonCardContent>
This is some text that is the content of the card with the close
button below
</IonCardContent>
</IonCard>
这篇关于仅工具栏外的离子4圆形图标按钮/离子按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文