您好我正在创建一个angularJs应用程序。表单工作正常,但单选按钮不会出现。我只能看到标签而不是实际的按钮。我已经按照网上的说明进行了操作,但它似乎是隐藏的。我试图创建一组6个单选按钮,用户只需选择一个按钮。
以下是部分形式之一。
由于
<div>
<div class="form-wrapper">
<p>Choose a fund</p>
<br>
To help you decide which fund is right for you, we've provided a summary of each below.
<br>
Simply click on the magnifying glass to view the individual fund details.
<br>
You can also compare all funds in this risk category using the fund comparison button at the bottom.
<br>
When you've reviewed your options and have made your choice, click 'select'.
<br>
<br>
<!-- <form class="form-horizontal" role="form">-->
<!-- <div class=" form-group">-->
<!-- <div class="col-sm-6">-->
<!-- <div class="form-group">-->
<label for="pearRadio">SEI Balanced Fund</label>
<input id="pearRadio" type="radio" ng-model="fruitValue" value="pear" /><br />
<label for="peachRadio">7IM AAP Balanced Acc Strategy</label>
<input id="peachRadio" type="radio" ng-model="fruitValue" value="peach" /><br />
<label for="apricotRadio">Close Balanced Portfolio Fund Accumulation</label>
<input id="apricotRadio" type="radio" ng-model="fruitValue" value="apricot" /><br />
<label for="pearRadio">Allianz RiskMaster Moderate</label>
<input id="pearRadio" type="radio" ng-model="fruitValue" value="pear" /><br />
<label for="peachRadio">Schroder MM Diversity Balanced Fund Accumulation</label>
<input id="peachRadio" type="radio" ng-model="fruitValue" value="peach" /><br />
<label for="apricotRadio">Goldman Sachs Dynamic</label>
<input id="apricotRadio" type="radio" ng-model="fruitValue" value="apricot" /><br />
<br />
<strong>Selected Fund:</strong> {{fruitValue}}
</div>
<button class="btn btn-primary"
ng-click="goToNextState('form.account')">Next</button>
</form>
</div>
</div>
答案 0 :(得分:1)
首先,如果您需要,请不要重复值 用户只选择一个单选按钮。
检查.form-wrapper类css属性 输入不透明度为0或显示无...
我根据您的代码制作了演示并且工作正常:
<input id="pearRadio1" type="radio" ng-model="fruitValue" value="pear1" />
我对值进行了一些更改。