📜  HTML meter标签

📅  最后修改于: 2020-11-04 00:49:03             🧑  作者: Mango

HTML Meter标签

HTML标签用于测量给定范围内的数据。它定义了带范围的标量测量。它也被称为“ gause”。

它应该用于显示磁盘使用情况,投票人数等。

HTML meter标签是HTML5中的新增功能,因此您必须使用新的浏览器。

HTML Meter标签的属性

HTML标记支持全局和事件属性以及某些特定属性。

Attributes Description
value It is a mandatory attribute which is used to specify a value in numbers. The number may be integer or floating point number.
form It specifies one or more forms to which meter element belongs to.
high It specifies a range that is considered as high value.
low It specifies a range that is considered as low value.
max It specifies the maximum value defined in the range.
min It specifies the minimum value defined in the range.
optimum It specifies the optimum value for the gauge.It is an optional attribute.

HTML Meter标签示例

让我们看一下带有min,max和value属性的进度示例。

Display a gauge:

30 out of 100
80%

输出:

显示量规:

CSS

您可以在电表标签上应用CSS代码。

meter{
  width: 300px;
  height: 30px;
}

输出:

支持的浏览器

Element chrome browser Chrome ie browser IE firefox browser Firefox opera browser Opera safari browser Safari
Yes Yes Yes Yes Yes