How to change the opacity or transparency of a background image with CSS

Best solution I found to make the background image in a div slightly transparent/opaque …

Best solution I found to make the background image in a div slightly transparent/opaque without impacting content of the div:

    background: linear-gradient( rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8) ), url('../img/image.png');
    background-repeat: no-repeat;  
    background-position: center;

➤ change 255 to 0 for black opacity.

links

social