CSS How to draw image with transparency instead of color?

109 Views Asked by At

I have a PCX-image with green background color rgb(41, 253, 46) and I need to show this color as a transparent one, when I display it via CSS.

I am not familiar with CSS or HTML and it taking few hours trying to find solution. Unsuccessfully though. Any ideas how to do this?

Restrictions: 1)use CSS 2)do not change image file 3)use this image file (not copy of it)

span#smlogo
{
    icon-decorator: image;
    icon-image-src: /ui_art/smlogo.pcx;
    icon-image-t-end: 154px;

    display: inline-block;
    width: 390px;
    height: 154px;
}

The image itself: image itself converted .pcx->.jpg

1

There are 1 best solutions below

2
rb612 On

In order to show transparency, you will need to use

rgba(41,253,46,.5) 

The .5 at the end is a random alpha value I chose. It could be between 0.0-1.0, with 1.0 being completely opaque.

Hope this helps! :D