What is the color code for transparency in CSS?

Can someone tell me what is the color code for transparency in CSS like white = "#FFFFFF"? Since I use the following code to convert color codes to int:

Color color = ColorTranslator.FromHtml(hex); return (int)((color.R << 16) | (color.G << 8) | (color.B << 0)); 
+8
html background-color css
source share
9 answers

how to make transparent elements using css:

CSS for IE:

 filter: alpha(opacity = 52); 

CSS for other browsers:

 opacity:0.52; 
+12
source share

There is no hex code for transparency. For CSS, you can use either transparent or rgba(0, 0, 0, 0) .

+11
source share

Just select the background color of your element and separate its opacity:

 div { background-color:#000; opacity:0.8; } 
+6
source share

Or you could just put

 background-color: rgba(0,0,0,0.0); 

This should solve your problem.

+5
source share

There is no transparency component of the hexadecimal color string. There is opacity , which is a floating point from 0.0 to 1.0.

+3
source share

try using

 background-color: none; 

who worked for me.

+1
source share

jus add two zeros (00) in front of your color code, you will get a transparent color

0
source share

In CSS write:

 .exampleclass { background:#000000; opacity: 10; /* you can always adjust this */ } 
0
source share

Simply put:

 .democlass { background-color: rgba(246,245,245,0); } 

This should give you a transparent background.

-one
source share

All Articles