我试图创建一个时间轴,其中包含绘制的阶段,如时间轴,静态使用进度条和弹出窗口。
我接近我想要的但是我有两个问题:
我已将我迄今为止所做的工作添加到JS小提琴中。
由于
http://jsfiddle.net/elogicmedia/pGr2M/
我的HTML
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" title="" style="width: 40%">Day 4
</div>
<div style="width: 100%;">
<ul id="horizontal-style">
<li class="mypopover" data-placement="top" data-content="Signed Contract" style="width: 0%; margin-bottom: 10px;"></li>
<li class="mypopover" data-placement="bottom" data-content="Building & Pest" style="width: 40%"></li>
<li class="mypopover" data-placement="top" data-content="Finance" style="width: 0%"></li>
<li class="mypopover" data-placement="bottom" data-content="Unconditional" style="width: 50%"></li>
<li class="mypopover" data-placement="top" data-content="Settlement" style="width: 5%"></li>
</ul>
</div>
</div>
我的CSS
body {
margin-top: 100px;
}
#horizontal-style {
display: table;
width: 100%;
}
#horizontal-style li {
display: table-cell;
}
答案 0 :(得分:2)
你可以这样:
HTML:
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" title="" style="width: 40%">Day 4</div>
<div style="width: 100%;">
<ul id="horizontal-style">
<li class="mypopover" data-placement="top" data-content="Signed Contract" style="width: 0%; margin-bottom: 10px;"></li>
<li class="mypopover" data-placement="bottom" data-content="Building & Pest" style="width: 40%"></li>
<li class="mypopover" data-placement="top" data-content="Finance" style="width: 0%"></li>
<li class="mypopover" data-placement="bottom" data-content="Unconditional" style="width: 50%"></li>
<li class="mypopover" data-placement="top" data-content="Settlement" style="width: 5%"></li>
</ul>
</div>
</div>
CSS:
body {
margin-top: 100px;
}
.progress-bar-success {
position: relative;
}
#horizontal-style {
display: table;
width: 100%;
position:absolute;
height:20px;
}
#horizontal-style li {
display: table-cell;
}