Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transparent image - background color

Tags:

html

css

I'm wondering if it is possible to set a background color for transparent images? (only the image will have background color)

like image 880
Mia Avatar asked Jan 21 '13 20:01

Mia


People also ask

How do I add color to a transparent picture?

Select the picture for which you want to change the transparency of a color. On the Picture Format tab, select Color, and then select Set Transparent Color. Click the color in the picture or image that you want to make transparent. Note: You can't make more than one color in a picture transparent.

What is the color code for transparent background?

#0000ffff - that is the code that you need for transparent.


1 Answers

If I understand you right, you can do this:

<img src="image.png" style="background-color:red;" /> 

In fact, you can even apply a whole background-image to the image, resulting in two "layers" without the need for multi-background support in the browser ;)

like image 91
Niet the Dark Absol Avatar answered Oct 02 '22 14:10

Niet the Dark Absol