How to make the div background color transparent in CSS?

Spread the love

Sometimes, we want to make the div background color transparent in CSS.

In this article, we’ll look at how to make the div background color transparent in CSS.

How to make the div background color transparent in CSS?

To make the div background color transparent in CSS, we set the background color to a rgba color.

For instance, we write

background-color: rgba(255, 0, 0, 0.4);

to set the background-color to the rgba color.

Then a value is the opacity value, which is 0.4.

Conclusion

To make the div background color transparent in CSS, we set the background color to a rgba color.

Leave a Reply

Your email address will not be published.