我正在尝试使用3个单选按钮创建一个面板页脚。
现在看起来像这样:
我希望按钮能够拉伸并填充页脚。
这是我的代码:
<div class="panel-heading">
<strong>Title</strong>
</div>
<div class="panel-body">
<div class="media">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</div>
</div>
<div class="panel-footer">
<div class="btn-group btn-block" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1" style="width:30%"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2" style="width:30%"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3" style="width:30%"> Option 3
</label>
</div>
</div>
任何想法? 感谢。
答案 0 :(得分:0)
由于您使用的是bootstrap,请尝试在代码中包含网格。
在按钮标签中添加class =“class =”col-sm-4 col-xl-4 col-md-4“,并为所有三个按钮设置width =”100%“。
答案 1 :(得分:0)
使用btn-group-justified
。
<div class="panel-footer">
<div class="btn-group-justified btn-block" data-toggle="buttons">