css – 如何在Twitter Bootstrap中垂直对齐一个进度条?

前端之家收集整理的这篇文章主要介绍了css – 如何在Twitter Bootstrap中垂直对齐一个进度条?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用 progressbar control of twitter-bootstrap.

我想垂直对齐,如下图所示:

我发现this thread,但恐怕现在不行.

所以我这样做:http://tinker.io/e69ff/2

HTML

<br>
<div class="progress vertical">
  <div class="bar bar-success" style="width: 70%;"></div>
  <div class="bar bar-warning" style="width: 20%;"></div>
  <div class="bar bar-danger" style="width: 10%;"></div>
</div>

CSS

.progress.vertical {
    position: relative;
    width: 20px;
    min-height: 240px;
    float: left;
    margin-right: 20px;
    background: none;
    -webkit-Box-shadow: none;
    -moz-Box-shadow: none;
    Box-shadow: none;
    border: none;
}

你有任何提示或建议来得到它吗?如果您需要更多信息,请告诉我,我将编辑该信息.

解决方法

Bootstrap 2

注意这是一个引导程序2的解决方案:

宽度100%,高度可变:

<br>
<div class="progress vertical">
  <div class="bar bar-success" style="height: 70%;width:100%"></div>
  <div class="bar bar-warning" style="height: 20%;width:100%"></div>
  <div class="bar bar-danger" style="height: 10%;width:100%"></div>
</div>

引导3

我想你参考others comments on this page

原文链接:https://www.f2er.com/css/216474.html

猜你在找的CSS相关文章