Bootstrap 3.3.6:获得与使用nav-justified相同的效果:同一行中具有相同宽度的多个div

时间:2016-07-25 06:58:33

标签: twitter-bootstrap

是否可以将水平对齐的元素(即同一行)具有相同的宽度?我的意思是,如果我有两个div's,他们将总是50%,我有3个div他们将有33.3%的宽度。 div's的数量是不可预测的。

我使用nav-justified就像这里一样有效:

            
<!-- 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">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

<ul class="nav nav-pills nav-justified" >
  <li ><a href="/">Home</a></li>
  <li><a href="#">Some</a></li>
</ul>

但是......有没有办法达到相同的效果,不使用nav-justified,但其他类与导航栏无关?

0 个答案:

没有答案