2013-11-28 87 views

回答

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

這種工作,我不得不在.btn對齊.btn寬度調整至33%。 – asonnenschein

0

它工作正常,我(LESS):

.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; } 
    } 
}