Ani*_*mde 23 html css progress-bar
我正在尝试实现UI,如图所示.然而,在尝试定位组合之后,我现在很难,但我一无所知.有人可以帮我弄这个吗?

<style>
.progress{
position:relative;
width:500px;
}
.bar{
}
.percent{
}
</style>
<div class="progress">
<span class="bar" width="%"></span>
<span class="percent">50%</span>
</div>
Run Code Online (Sandbox Code Playgroud)
Mat*_*ell 28
HTML:
<div id="progress">
<span id="percent">30%</span>
<div id="bar"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
#progress {
width: 500px;
border: 1px solid black;
position: relative;
padding: 3px;
}
#percent {
position: absolute;
left: 50%;
}
#bar {
height: 20px;
background-color: green;
width: 30%;
}
Run Code Online (Sandbox Code Playgroud)
此处示例:http://jsfiddle.net/WawPr/
.progress{
position:relative;
width:500px;
border:1px solid #333;
position:relative;
padding:3px;
}
.bar{
background-color:#00ff00;
width:50%;
height:20px;
transition:width 150ms;
}
.percent{
position:absolute;
display:inline-block;
top:3px;
left:50%;
transform:translateX(-50%);
}Run Code Online (Sandbox Code Playgroud)
<div class="progress">
<div class="bar"></div >
<div class="percent">50%</div >
</div>Run Code Online (Sandbox Code Playgroud)
互动演示http://jsfiddle.net/gaby/Zfzva/
| 归档时间: |
|
| 查看次数: |
53154 次 |
| 最近记录: |