I’d like to create a scale with stars\flowers\whatever that will enable me to graphically present a fraction, in case of average grade (say 4.35). Is there a way to partially fill an empty non-rectangular image using CSS?
TIA, Matanya
I’d like to create a scale with stars\flowers\whatever that will enable me to graphically
Share
If you are okay with using a
divinstead of animgfor the image, you could set the image as a background in thedivelement, and calculate the width of the div, depending on how much of the image you want to show.The calculation would have to be done through JavaScript, or server-side and then added inline on the
divelement, though.