4 ms·
That's cheating :) CSS is applied to the whole character.. I'm sure that you can avoid javascript by using content:attr(letter) in before and after. like <span
by m1117 12y ago
That's cheating :) CSS is applied to the whole character.. I'm sure that you can avoid javascript by using content:attr(letter) in before and after. like <span letter="X" class="half-red-half-green"></span>
- tnorthcutt 12y agoIf you're sure that it can be done without javascript, adding your solution as an answer on the SO question would probably be greatly appreciated.
- thefreeman 12y agoThat is the exact technique that is used in the accepted answer. It does appear that the answer was recently edited though so perhaps these comments were made before that.