I have:
<span id=string>12h12m12s</span>
and I'm looking to make the h
, m
and s
smaller than the rest of the text. I've heard of the nth-letter
pseudo element in css, but it doesn't seem to be working:
#string:nth-letter(3),
#string:nth-letter(6),
#string:nth-letter(9) {
font-size: 2em;
}
I know I could use javascript to parse the string and replace the letter with surrounding span
tags and style the tags. However, the string is updated every second and it seems parsing that often would be ressource intensive.