Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> meter { width: 300px; height: 20px; } meter::-webkit-meter-bar { background: none; background-color: lightgrey; box-shadow: 0 3px 3px -3px #333 inset; } meter::-webkit-meter-optimum-value { -webkit-transition: width .5s; box-shadow: 0 5px 5px -5px #999 inset; background-image: linear-gradient( 90deg, #2286c9 5%, #FF00FF 5%, #FF00FF 15%, #04C319 15%, #04C319 55%, #F1F70D 55%, #F1F70D 95%, #00FFCC 95%, #00FFCC 100%); background-size: 100% 100%; } meter::-webkit-meter-optimum-value:hover { /* Reset each sub-category to 20% */ background-image: linear-gradient( 90deg, #2286c9 20%, #FF00FF 20%, #FF00FF 40%, #04C319 40%, #04C319 60%, #F1F70D 60%, #F1F70D 80%, #00FFCC 80%, #00FFCC 100%); transition: width .5s; width: 100% !important; } </style> </head> <body> <meter value="25" min="0" max="70"></meter> </body> </html>