How to use css to remove the white background of the picture and make the white background picture transparent on the web page

Generally, product list pages are all product pictures with a white background. Sometimes I feel that the white background is not good. If I want to change to a gray or other light background, do I need to reprocess the pictures? The bottom picture is displayed transparently, so that we define any background color under the picture, which is equivalent to changing the background color of the picture without changing the background in Photoshop. Since it is defined by css, it basically does not affect performance.

mix-blend-mode: multiply bottom-to-bottom

In Photoshop, the white background is removed by stacking the bottom. Also in CSS, we can remove the white background of the image by stacking the img at the bottom, so that the image is transparent.

So there is a reason why some e-commerce platforms have white background images, and they may want to change the background color of the image somewhere.

The post How to use CSS to remove the white background of the image and make the white background image transparent first appeared on Lenix Blog .

This article is reprinted from https://blog.p2hp.com/archives/9793
This site is for inclusion only, and the copyright belongs to the original author.