Issue
Is there a way to change the background color of HTML meter?
I know ,by default its background color is green.
Is this possible to change its background color from green to any other color?
I tried with the style attribute but it still remains green.
<meter style="background-color:red;"min="0" low="40" high="95" max="100" value="65">
</meter>
Solution
You need to select the meter value and than style accordingly, and for more inputs refer this link.
meter::-webkit-meter-optimum-value {
box-shadow: 0 5px 5px -5px #999 inset;
background-image: linear-gradient(
90deg,
#8bcf69 5%,
#e6d450 5%,
#e6d450 15%,
#f28f68 15%,
#f28f68 55%,
#cf82bf 55%,
#cf82bf 95%,
#719fd1 95%,
#719fd1 100%
);
background-size: 100% 100%;
}
<meter value="0.6"></meter>
Answered By - stanze
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.