jQuery 1.7.2, HTML, CSS, JavaScript
No-Library (pure JS), HTML, CSS, JavaScript
In desktop the order of color is blue, black, yellow, red, green. In mobile the color order is blue, black, yellow, red, green.
Here are the example code for using Nested CSS Counters.
Here is an example for the simple CSS Counter. By this we can count and append the serial number for the element.