html 设计进度条的样式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 设计进度条的样式相关的知识,希望对你有一定的参考价值。

 Styling a Progress Bar
-----------------------


A [Pen](https://codepen.io/harunpehlivan/pen/xJaKQG) by [HARUN PEHLİVAN](https://codepen.io/harunpehlivan) on [CodePen](https://codepen.io).

[License](https://codepen.io/harunpehlivan/pen/xJaKQG/license).
	.progress-bar {

	  background: linear-gradient(to bottom, #ddd, #eee 20%, #ccc 45%, #ccc 55%, #ddd);

	  width: 200px;

	  height: 20px;

	}

	.progress-bar > span {

	  background: linear-gradient(to bottom, #f77, #fcc 20%, #d44 45%, #d44 55%, #f77);

	  height: 100%;
	  display: block;
	}

	.progress-bar > span[style="width: 100%;"] {

	  background: linear-gradient(to bottom, #ad7, #cee 20%, #7a3 45%, #7a3 55%, #ad7);

	  height: 100%;

	  display: block;

	}
progress[value]  {

	  -webkit-appearance: none;

	  width: 200px;

	  height: 20px;

	  /* remove border in Firefox */

	  border: none;

	  /* IE */

	  color: red;

	}

	/* Chrome */

	progress[value]::-webkit-progress-bar {

	  background-color: #eee;
	progress[value]::-webkit-progress-value {
	  background-color: red;

	}

	progress[value="100"]::-webkit-progress-value  {

	  background-color: green;

	}

	/* Firefox */

	progress[value]::-moz-progress-bar {

	  background-color: red;

	}

	progress[value="100"]::-moz-progress-bar  {

	  background: green;

	}

	/* IE */

	progress[value="100"]  {

	  color: green;

	}
<div class="progress-bar">

	    <span style="width: 80%;">

	</span></div>

	<p>

	</p><div class="progress-bar">

	    <span style="width: 100%;">

	</span></div>

以上是关于html 设计进度条的样式的主要内容,如果未能解决你的问题,请参考以下文章

progress进度条的样式修改

安卓ProgressBar水平进度条的颜色设置

ProgressDialog

js 代码实现视频进度条点到哪个位置就播放那个位置的视频。进度条是用css样式另做的。

Android中显示进度的控件

如何制作WinForm中自定义进度条