如何使单选按钮像单选按钮一样 [英] How to make mat-checkbox like a radio button
本文介绍了如何使单选按钮像单选按钮一样的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在angular项目中有一个mat-checkbox.如何选择垫子复选框只能被选中.(不超过一个).这是我的代码:
I have a mat-checkbox in the angular project. How to make a mat-checkbox can only be selected one. (No more than one). Here's the code I have:
<mat-checkbox>Pre Order</mat-checkbox>
<mat-checkbox>Order</mat-checkbox>
任何人都可以帮忙吗?我希望mat-checkbox像一个mat-radio-button一样.
Can anyone help? I want the mat-checkbox to behave like a mat-radio-button.
推荐答案
只是要获得正确的答案:
Just to get the correct answer:
- 使用垫子单选按钮
- 为
.mat-radio-outer-circle
CSS类设置border-radius:0%;
就是这样!
干杯!
这篇关于如何使单选按钮像单选按钮一样的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文