【发布时间】:2018-02-09 04:39:37
【问题描述】:
是否可以隐藏圆形老式单选按钮,使其不会出现在 bootrap 单选按钮上?我只使用引导 css 没有 jquery 或其他插件。
目前的按钮是这样的
我希望它们看起来像这样
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary" [ngClass]="{'active': radioYes}">
<input type="radio" name="options" id="option1" autocomplete="off" (click)="radioYes=true" > Yes
</label>
<label class="btn btn-primary" [ngClass]="{'active': !radioYes}">
<input type="radio" name="options" id="option2" autocomplete="off"(click)="radioYes=false" > No
</label>
</div>
使用 Bootstrap 4。没有额外的 css
【问题讨论】:
-
Bootstrap 默认隐藏圆圈。如果你有圆圈出现,那是因为另一种风格是冲突的。请更新您的问题以在minimal, complete, and verifiable example 中包含所有相关代码,包括您的 Bootstrap 版本。
-
我使用的是 bootstrap 4,没有额外的 css 库。
-
Bootstrap 4 没有额外的 CSS 默认隐藏单选按钮:jsfiddle.net/rqh8p169
-
jsfiddle.net/mo8oxxq4 使用最新的引导程序
-
只需要添加
btn-group-toggle
标签: css angular twitter-bootstrap