skip to Main Content

I just downloaded an html template, in that I can see the images having white background, but when those are used in site, they have background color changed.

Original Image

And this is what I see in the site:

Image in the site

So How to achieve this effect, I spent whole night changing background color of an image in photoshop, that does not look as good as it is in this image,

So there must be some method in CSS to do this..?

2

Answers


  1. This is done by image type. You likely need a PNG with transparency. If you are familiar with photoshop, you just erase the background (so the alpha-layer can show through there) and then save an a png. This will let the background color “show through” the image.

    Login or Signup to reply.
  2. Try this

    img {
        background-color : blue;
    }
    

    This will appear on when you use a png transparent image.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search