这是我的代码:
<div class="form-group">
<div class="btn-group radio-group" style="margin-right: 10px">
<label for="female" class="btn btn-default inputStyle"[ngClass]="{active: femaleSelected === 'active', butonStyle: femaleSelected === 'inactive'}">Female
<input (click)="onClickFemale()"id="female" value="female"></label>
</div>
<div class="btn-group radio-group">
<label for="male" class="btn btn-default inputStyle" [ngClass]="{active: maleSelected === 'active', butonStyle: maleSelected === 'inactive'}">Male
<input type="radio" (click)="onClickMale()" id="male" value="male"></label>
</div>
</div>
如果我在第一个div的浮动位置添加样式,则无法单击输入。