更新时间:2022-10-28 11:55:04
You can add a pseudo element to each progress
element and use the attr()
CSS function to display the value
attribute as the content of the pseudo element:
progress {
text-align: center;
}
progress:after {
content: attr(value)'%';
}
<progress max="100" value="26"></progress><br/>
<progress max="100" value="50"></progress><br/>
<progress max="100" value="73"><span></span></progress>