material radio 单选按钮(web版)
htmtl
<mat-radio-group>
<mat-radio-button value="1">Option 1</mat-radio-button>
<mat-radio-button value="2">Option 2</mat-radio-button>
</mat-radio-group>
ts
import {Component} from '@angular/core';
/**
* @title Basic radios
*/
@Component({
selector: 'radio-overview-example',
templateUrl: 'radio-overview-example.html',
styleUrls: ['radio-overview-example.css'],
})
export class RadioOverviewExample {}
css
.mat-radio-button ~ .mat-radio-button {
padding-right: 16px;
}