相容所有瀏覽器的progress程式碼例項

螞蟻小編發表於2017-02-26

下面分享一個能夠相容所有瀏覽器的此標籤,程式碼例項如下:

[HTML] 純文字檢視 複製程式碼
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="http://www.softwhy.com/" />
<title>螞蟻部落</title>
<style type="text/css">
progress {
  display: inline-block;
  width: 160px;
  height: 20px;
  border: 1px solid #0064B4;
  background-color: #e6e6e6;
  color: #0064B4; /*IE10*/
}
/*ie6-ie9*/
progress i {
  display: block;
  height: 100%;
  background: #0064B4;
}
progress::-moz-progress-bar {
  background: #0064B4;
}
progress::-webkit-progress-bar {
  background: #e6e6e6;
}
progress::-webkit-progress-value {
  background: #0064B4;
}
</style>
</head>
<body>
<progress max="100" value="20"><i style="width:20%;"></i></progress>
</body>
</html>

相關文章