How do you put Opacity on Background Image | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How do you put Opacity on Background Image

Hi guys. So I have this cool background image, but I want to make it more transparent. Is there a way to do this? https://code.sololearn.com/WaBPX0MgnEkc/?ref=app

16th Aug 2017, 8:51 PM
Samantha Hammes
Samantha Hammes - avatar
4 Answers
+ 4
Try this using the original image: // For opacity with white backgound background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)), url(" https://s-media-cache-ak0.pinimg.com/736x/08/37/b4/0837b42617824555d198e9d949d32c6d--friut-summer-fruits.jpg "); /" For opacity with black background background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url(" https://s-media-cache-ak0.pinimg.com/736x/08/37/b4/0837b42617824555d198e9d949d32c6d--friut-summer-fruits.jpg ");
16th Aug 2017, 11:54 PM
Calviղ
Calviղ - avatar
16th Aug 2017, 9:08 PM
Kamil
Kamil - avatar
+ 1
@kamil Thank you. Is there anyway you could actually put that in a code playground code for me to see?
16th Aug 2017, 9:18 PM
Samantha Hammes
Samantha Hammes - avatar
+ 1
@calvin Thank you so much. I have it working and on another project as well.
17th Aug 2017, 12:21 AM
Samantha Hammes
Samantha Hammes - avatar