gpt4 book ai didi

twitter-bootstrap - 如何在 Bootstrap 单选按钮组中制作相同高度的标签和值

转载 作者:行者123 更新时间:2023-12-04 07:47:07 25 4
gpt4 key购买 nike

我有以下 Bootstrap 单选按钮组,其中标签高度与值的高度不同。

https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />  

<div class="input-group input-group-lg">
<span class="input-group-addon" id="addon-title">Type</span>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary active">
<input type="radio" name="eventType" value="one"> One
</label>
<label class="btn btn-primary">
<input type="radio" name="eventType" value="two"> Two
</label>
<label class="btn btn-primary">
<input type="radio" name="eventType" value="three"> Three
</label>
<label class="btn btn-primary">
<input type="radio" name="eventType" value="four"> Four
</label>
</div>
</div>

我怎样才能改变它,使标签和值的高度没有差距?

最佳答案

尝试像示例中一样对标签使用 .btn-lg 类。

https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" />  

<div class="input-group input-group-lg">
<span class="input-group-addon" id="addon-title">Type</span>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary btn-lg active">
<input type="radio" name="eventType" value="one"> One
</label>
<label class="btn btn-primary btn-lg">
<input type="radio" name="eventType" value="two"> Two
</label>
<label class="btn btn-primary btn-lg">
<input type="radio" name="eventType" value="three"> Three
</label>
<label class="btn btn-primary btn-lg">
<input type="radio" name="eventType" value="four"> Four
</label>
</div>
</div>

关于twitter-bootstrap - 如何在 Bootstrap 单选按钮组中制作相同高度的标签和值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36134699/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com