How to add transparent CSS background color?

Spread the love

Sometimes, we want to add transparent CSS background color.

In this artricle, we’ll look at how to add transparent CSS background color.

How to add transparent CSS background color?

To add transparent CSS background color, we set the background property to the rgba value.

For instance, we write

.class {
  background: rgba(0, 0, 0, 0.5);
}

to set the background property to a rgba value.

0.5 is the opacity value.

Conclusion

To add transparent CSS background color, we set the background property to the rgba value.

Leave a Reply

Your email address will not be published. Required fields are marked *