by aleem · 11y ago · 0 comments
1. Create a JPG of the can and trim the edges off completely
2. Create a PNG of the can and remove the insides completely, leaving only the edges
3. Overlay the JPG on top of the PNG using CSS absolute positioning or background+foreground image or similar
Since the JPEG comprises only the inner part of the image, it doesn't affect anything. The PNG comprises the outer edges of the image and you get the desired transparency on the edges.
Furthermore, I'm pretty sure a slow device would take longer to paint four separate images due to the overhead of having four of them.
Also, some code left over:
console.log("toto");