title: Animate Custom Battery Fill Icon
body: <p>I am using HTML, CSS and Javascript in a cross-platform Ionic mobile app. I want to create a "live" battery fill graphic, so a battery outline has an analogue (ish) fill which moves with the percentage charge. </p>
  
  <p>I could obviously substitute the source image for a different picture every 5% etc. but this doesn't seem to be a great way of doing this. Is there a neater way using JS? </p>