lisovaccaro lisovaccaro - 3 months ago 6x
CSS Question

How do I make a semi transparent background?

I need to make a white background 50% transparent without affecting anything else. How do I do it?


Use rgba():


This will give you 50% opacity while the content of the box will continue to have 100% opacity.

If you use opacity:0.5, the content will be faded as well as the background. Hence do not use it.