我在bootstrap-3中看到css class btn-group-justified 。有没有办法在bootstrap 2.3.2版本中运行 btn-group-justified ?是的,我怎么能这样做?
答案 0 :(得分:1)
HTML:
<div class="btn-group btn-justified">
<a class="btn">Left</a>
<a class="btn">Middle</a>
<a class="btn">Right</a>
</div>
CSS:
.btn-justified{
display: inline-block;
width: 100%;
float: left;
}
.btn-justified .btn{
display: table-cell !important;
float: none;
width: 1%;
}
答案 1 :(得分:0)
对我来说很好(少):
.btn-group-justified{
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
>.btn,
>.btn-group{
display: table-cell;
float: none;
width: 1%;
}
>.btn-group{
.btn{ width: 100%; }
.dropdown-menu{ left: auto; }
}
}