The final parameter to the rgba() function is the alpha or opacity parameter. If you set it to 0 , it will mean "completely transparent", and the first three parameters ( red , green and blue channels) will not matter, because you will not be able to see the color in any case.
Given this, I would choose rgba(0, 0, 0, 0) because:
- it's less typing
- it stores a few extra bytes from your CSS file and
- you will see an obvious problem if the alpha value changes to something unwanted.
You could avoid the rgba model rgba and use the transparent keyword instead, which according to w3.org is equivalent to "transparent black" and must be evaluated before rgba(0, 0, 0, 0) . For example:
h1 { background-color: transparent; }
This will save you a couple more bytes, while your intentions to use transparency are obvious (in case someone is not familiar with RGBA).
As with CSS3, you can use the transparent keyword for any CSS property that accepts color.
Cα΄ΚΚ Apr 11 '13 at 20:49
source share