html - 如何在 css 中显示一个显示超额完成(超过 100%)的进度条?

标签 html css

我正在尝试显示一个进度条,该进度条以不同的颜色显示超过 100% 的百分比,以表明已经超额完成。这如何在 HTML/CSS 中完成?

以下内容适用于显示百分比高达 100% 的进度条

<div id="progressbar">
  <div></div>
</div>

#progressbar {
  background-color: black;
  border-radius: 13px; /* (height of inner div) / 2 + padding */
  padding: 3px;
}

#progressbar div {
   background-color: orange;
   width: 40%; /* Adjust with JavaScript */
   height: 20px;
   border-radius: 10px;
}

谢谢!

最佳答案

http://jsfiddle.net/qTmGE/1/

请原谅我使用 jQuery。

关于html - 如何在 css 中显示一个显示超额完成(超过 100%)的进度条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12870993/

相关文章:

html - 如何让 n 个 <li> 适合 <ul> 宽度?

html - Bootstrap css 根据另一个div的文本长度将文本居中对齐

javascript - 如何在响应式 div 中缩进由溢出包装引起的每一秒可视行

css - img属性全局样式生效

css - 联系表单内容在窗口调整大小时溢出容器 div

javascript - 访问 session 值

javascript - 不使用<table>标签制作表结构?

html - 重叠 div 上的悬停事件不起作用

html - 将div格式化成表格

javascript - 代码在 jsfiddle 中有效,但在 Lamp Localhost 中无效