CSS · Colour and backgrounds

opacity

Makes an element and all of its children partially transparent. For colours only, use rgb() with alpha.

Syntax
opacity: 0.6

Example

Try it

More in this group

accent-color background-clip background-color background-image background-position background-repeat background-size color

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course