javascript - CSS: Filling an image usng Keyframes -
this image: .
you know how progress bars work, if give value of 50, , later use javascript change transition, smooth, , progress bar filled.
now, see white portion in image?
say, there field called votes
. based on value of votes, same amount of color should filled inside coffee image. (replacing equal amount of white.)
yes, can develop hundred images, , in photoshop, pretty lame.
there thing called keyframes, , there animations, not able findna way animate using css.
i have seen on behance, , common thing. crazy thing is, cant find on google.
in simple words, based on amount of votes, white portion should replaced equal amount of other color.
like this: codepen.io: image filling progress
turn image transparent png, , have colored div behind image change height based on number of votes.
Comments
Post a Comment