【发布时间】:2016-06-14 15:34:35
【问题描述】:
我想知道是否可以创建一个引导无线电 btn-group 以添加到输入组?
我知道可以创建类似于我的 sn-p 代码显示的内容,但我想创建它,其中两个单选按钮被隐藏并设置如下图所示的样式:
我希望它们成为实际的单选按钮,因为这是选择其中任何一个的标准做法。我不希望它们只是按钮。
我尝试像图片一样设置单选按钮的样式,但它对我来说不能正常工作,所以任何帮助都会很棒。
谢谢。
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="input-group">
<!-- class="input-group-addon" -->
<input type="text" class="form-control" placeholder="some info here" aria-label="text input checkbox">
<span class="input-group-addon">
<input type="radio" aria-label="checkbox inside input group"> Female</span>
<span class="input-group-addon">
<input type="radio" aria-label="checkbox inside input group"> Male</span>
</div>
</div>
</div>
</div>
【问题讨论】:
标签: jquery html css twitter-bootstrap