Opacity
When painting, mixing in water makes the colors more transparent.
As the transparency increases, the layers or background beneath become more visible.
In CSS, opacity
is a property that adjusts the transparency of web elements, giving HTML elements the effect similar to transparent paint.
The opacity
property has a value between 0.0
and 1.0
.
Here, 0.0
means completely transparent and 1.0
means completely opaque.
The smaller the value, the more transparent the element becomes, and the larger the value, the more opaque it becomes.
CSS Example
.transparent-box { opacity: 0; /* Fully transparent */ } .half-transparent-box { opacity: 0.5; /* 50% transparent */ } .opaque-box { opacity: 1; /* Opaque (default) */ }
Follow the highlighted parts of the code and try entering them yourself.
Mission
0 / 1
What is the most appropriate value to fill in the blank below?
The value of the CSS `opacity` property that represents the most transparent state is .
0.0
0.5
0.8
1.0
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help