html - bootstrap col 中的拟合条出现问题

标签 html css twitter-bootstrap

我使用 bootstrap 列将布局设置为新业务概念的仪表板。我有一些位于 div 中的进度条,但是如果没有第五个条跳出 div,尝试排序和适合五个条被证明是困难的。我希望条形图堆叠在 div 中,标签位于条形图的顶部或旁边。你能帮忙吗?附言。 ID 仅用于更改进度条的长度。

条形码是:

.container-for-bar{
border:1px solid gray;
height:12px;
width:100px;
padding:1px;
display: inline-block;


}
.bar{
background-color: purple;
width:50%;  /*change this for progress*/
height: 100%;
}
.bar-text {

	display:inline-block;
	font-size: 12px;

}
.bar-text-top {

	
	font-size: 12px;

}
.progress-bar-purple {
background-color: purple;
color: black;

}

/* Bootstrap progress bars*/

.progress-bar-text {

	float: left; text-align: center;
	padding-left: 2px;
}

.half-unit {		
	margin-bottom: 20px;
	padding-bottom: 4px;
	border: 1px solid #383737;
	background-image:url('../img/sep-half.html');
	background-color: #D8D8D8;
	color:black;
	height:130px;
	padding: 5px;
}

.tipi {


}

.purple {		
	
	background-color: #5C005C;
	color:white;

}
.half-unit:hover {
	background-color: #4f4f4f;
	-moz-box-shadow:    3px 3px 2px 0px #151515;
    -webkit-box-shadow: 3px 3px 2px 0px #151515;
    box-shadow:         3px 3px 2px 0px #151515;

}

.half-unit dtitle {
	font-size:10px;
	text-transform:uppercase;
	color:#000000000000;
	margin:0px;
	padding:0px;
	height:inherit	
	}
	
.half-unit hr {
  	border: 0;
  	border-top: 1px solid #151515;
  	border-top-style: dashed;
	margin-top:0px;
}

.half-unit h1 {
	font-family: 'Raleway', sans-serif;
	font-weight:300;
	font-size: 20px;
	line-height: 1;
	letter-spacing: 0px;
	color: #000000000000;
	padding-top:10px;
	padding-left:5px;
	margin-top:2px;
	text-align:center;
}

.half-unit h4 {
	padding-left:5px;
	margin-top:2px;
	font-size: 13px;
	font-weight:lighter;
	line-height: 1;
	letter-spacing: 0px;
	color: #000000;
}


.half-unit bold{
	font-family: 'Open Sans', sans-serif;
	font-size:26px;
	font-weight:bold;
	color:#000000;
	vertical-align:middle;
}

.green {

	background-color: 'green';
}
<div class="col-sm-3 col-lg-3">
            	

               <div class="half-unit tipi">
                 <dtitle>T.I.P.I</dtitle>
                 <hr>
                 <div class="col-sm-6">
                     <div class="bar-text-top">&nbsp;&nbsp;Extroversion&nbsp;</div>
                     <div class="container-for-bar">

                       <div class="bar" id="Extroversion_bar"></div> 
                   </div>
                   <div class="bar-text-top">&nbsp;&nbsp;Conscientiousness&nbsp;</div>

                   <div class="container-for-bar">

                    <div class="bar" id="Conscientiousness_bar"></div> 
                </div>

            </div>
            <div class="col-sm-6">
               <div class="bar-text">&nbsp;&nbsp;Agreeableness&nbsp;</div>
               <div class="container-for-bar">

                <div class="bar" id="Agreeableness_bar"></div> 
            </div>
            
            <div class="bar-text">&nbsp;&nbsp;Calmness&nbsp;</div>
            <div class="container-for-bar">

                <div class="bar" id="Calmness_bar"></div> 
            </div>
           <div class="bar-text">&nbsp;&nbsp;Openess&nbsp;</div>
                <div class="container-for-bar">

                <div class="bar" id="Openess_bar"></div> 
            </div>
        </div>
    </div>

最佳答案

我分成行,然后分成列,这似乎可行。

关于html - bootstrap col 中的拟合条出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29918308/

相关文章:

html - Django 静态文件图像不显示

html - Bootstrap DatePicker 位置

jquery - Bootstrap 警报自动扩展动态宽度父级

css - 使用推拉 Bootstrap 在移动设备上向上移动 div

javascript - AngularJS 获取和设置元素高度

php - 将表单选择选项值发送到数据库不起作用

html - 在容器 div 中水平居中两个 div

c# - 将 Zurb Foundation 添加到新的 asp.net webforms 应用程序

android - 移动宽度水平和垂直相同(RWD)

css - 使用 CSS3 缩小和增大元素