How can I add a background image to an element and make it transparent?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
CSS doesn’t provide a way to add translucency to just a background image.
You can use the
opacityproperty to make the entire element (content and children included) translucent.You can use
rgba()colour values to make a plain background translucent.If you want a translucent background image, your best bet is to edit the image itself (and save it in a format that supports translucency, such as PNG).