How to Change Opacity Using CSS

The opacity property accepts a numeric value from 0 to 1, allowing you to control the opacity of an element.

html
1<div></div>
css
1div {
2  width: 300px;
3  height: 400px;
4  background-image: url(. . .);
5  background-size: cover;
6
7  opacity: 0.5;
8}
Open demo in new tab