javascript - Is there a way to dynamically change the color of an icon? -


i have star icon. want use icon in unknown number of colors.

sometimes need red star, purple star.

i dynamically create images on server web service.

what i'm curious about, there way control color of icon without explicitly creating image every color may need ?

you should use glyphicons or other type of icon-based font: http://twitter.github.com/bootstrap/base-css.html#icons

here's example of icon-based fonts in action: http://css-tricks.com/examples/iconfont/


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -