Lower the opacity of a background-image with CSS

Lower the opacity of a background-image with CSS

Kevin Powell

1 год назад

67,115 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Raghav Srivastava
Raghav Srivastava - 23.10.2023 19:29

Finally!!! i found the solution.....thanks a lot

Ответить
Wasim Patel
Wasim Patel - 19.10.2023 21:23

why it doesnt change anything using "after and before."?

Ответить
საბა ნიკაჭაძე
საბა ნიკაჭაძე - 11.10.2023 18:57

deserved follow

Ответить
Louise Knudsen
Louise Knudsen - 23.09.2023 18:32

Can you do this with several images close to each other? Tried this with images of letters and the last two letters moved from there place on the pages. What to do?? Help

Ответить
Zack Galyen
Zack Galyen - 06.09.2023 06:41

For some reason, when I do this, "background-blend-mode" doesn't work. I can't get the image to interact with the background (in my case, a radial gradient). Please help!

Ответить
Hazem Gamal
Hazem Gamal - 28.08.2023 19:23

thanks, I appreciate that 😍

Ответить
weirdology
weirdology - 17.08.2023 06:30

why not using background-blend-mode ?

Ответить
The Stark
The Stark - 01.08.2023 13:21

Also try
Background-color : anyone;
Background-blend-mode : darken;

Ответить
priyanka nagulapally
priyanka nagulapally - 28.07.2023 19:46

i was struggling with the issue since long. thank you so much.! very well explained.!

Ответить
Somil Dogra
Somil Dogra - 12.07.2023 11:19

Thanks Man
You helped me a lot
❤ From India

Ответить
Realraven2000
Realraven2000 - 07.05.2023 22:43

I always thought it would be good to overlay with a white div of less opacity... in the email world, I am always asked to do this to the body element.

Ответить
Andreas
Andreas - 30.04.2023 07:00

the simplest ways is to use backdrop-filter

Ответить
Elgün Məhərrəmov
Elgün Məhərrəmov - 11.03.2023 21:44

thank you so much

Ответить
Victor Saad
Victor Saad - 10.03.2023 00:11

Amazing!
Finally found someone who actually solved my problem, thanks Kevin!
Cheers from Brazil!

Ответить
Andre Terra
Andre Terra - 24.02.2023 04:37

Kevin, your videos are completely awesome!

Ответить
tahmina Rasul
tahmina Rasul - 04.02.2023 02:26

Thank u very much, this video helped me.

Ответить
Darshan Patel
Darshan Patel - 03.02.2023 10:05

can we do this similar thing by using multiple bg like

background: rgba(0,0,0,0.5) url("Image");
background-blend-mode: overlay;

Ответить
VFX Genie
VFX Genie - 06.01.2023 02:10

i love you xxxxxx

Ответить
Gone Wild
Gone Wild - 21.12.2022 14:35

Do another video for Tailwind css

Ответить
Tomas Barek
Tomas Barek - 21.12.2022 10:58

This is literally the only explanation on the whole internet for this that does the trick and actually explains it too .. I was getting anxious already how to solve that .. thank you sir

Ответить
Ian Carr
Ian Carr - 12.12.2022 16:18

Excellent, thanks!

Ответить
Gerrit for Bazeja
Gerrit for Bazeja - 29.11.2022 17:15

That's nice tnx

Ответить
Abnormal
Abnormal - 08.11.2022 15:25

What about backdrop filter?

Ответить
Giorgi Mindiashvili
Giorgi Mindiashvili - 02.11.2022 02:20

u are really king of css thank u bro

Ответить
Samsur Rahman Saiel
Samsur Rahman Saiel - 21.10.2022 21:07

thansk a lot

Ответить
Horia Frincu
Horia Frincu - 20.10.2022 15:03

very very very usefull! Thank youu!!!

Ответить
Marcelo Brasil - Developer
Marcelo Brasil - Developer - 18.10.2022 01:41

Hi Kevin, I love your videos, it helps me a lot! Anyway, opacity did not work for me, but rgba did. I am using Chrome btw. Do you know why is that?

Ответить
PoderAccionSocial Colombia
PoderAccionSocial Colombia - 16.10.2022 06:30

Hi Kevin, i am enjoying your proficiency a lot!
Just a question: i am having hard time changing the opacity of a picture but a hovered area [areas from paths on svg file], and the opacity shall be applied when a referenced area in css is hovered only.

I tried the .class1: hover .class2:not(:hover), where class 2 is a path of the whole picture.
Any suggestions are deeply appreciated.
Thanks a lot man 🥇

Ответить
Codehal
Codehal - 13.09.2022 16:45

Great Video, you're amazing, Thanks sir❤

Ответить
AiWith_Hamza
AiWith_Hamza - 10.09.2022 15:15

buddy we can do it easily, just change the opacity of the image itself

Ответить
salim informatique
salim informatique - 06.09.2022 15:25

...

Ответить
Mark A. B.
Mark A. B. - 06.09.2022 05:07

I've also got this question a lot but never understood the point. The image is in the background you can make it any opacity you want by just using a png or just save it with a color overlay. I mean it's in the background just make it the way you need it in photoshop.

Ответить
sei_btz
sei_btz - 02.09.2022 13:58

Bro you are beast

Ответить
JustNpcGaming
JustNpcGaming - 02.09.2022 03:02

This works. Recommended to try this out. Thanks a lot for your help

Ответить
dluca182
dluca182 - 28.08.2022 16:32

I so desperately needed this
I couldn't figure out from other written tutorials, but merging them with yours i finally got to have the style i was looking for my mockup
Thanks!

Ответить
Khaled SANNY
Khaled SANNY - 26.08.2022 18:29

I put the background in ::after element and decrease it’s opacity

Ответить
Fatema
Fatema - 26.08.2022 14:11

linear-gradient is the best solution for this. 🙂

Ответить
Keviin Cosmos
Keviin Cosmos - 24.08.2022 12:52

Love it 😍 👍

Ответить
Mohammed Bn
Mohammed Bn - 24.08.2022 08:46

amazing! the possibilities with the pseudo after are endless

Ответить
Julian
Julian - 23.08.2022 23:21

Great video, I didn't know this other way to do it.. I achieve the same result with a lot of less code with linear-gradient

Ответить
James Cabreros
James Cabreros - 23.08.2022 19:32

it worked! thank you so much!!

Ответить
Ashmughl
Ashmughl - 23.08.2022 11:49

i'm in love with u

Ответить
AJman14
AJman14 - 23.08.2022 09:43

If needed, you could control the image in the HTML by using inline styling for the custom property.

Ответить
sanaz j
sanaz j - 21.08.2022 20:02

You're amazing! Thank you so much!😀By the way can you help me find a simple project to start Javascipt PLEASE?

Ответить
Lakshya Srivastava
Lakshya Srivastava - 21.08.2022 14:45

Thanks for the informative video kevin

Ответить
Lakshya Srivastava
Lakshya Srivastava - 21.08.2022 14:37

great video

Ответить
Abdul Nafay
Abdul Nafay - 21.08.2022 09:57

Hi Kevin, I was ran into similar problem while developing the design but instead of using background I have to use filter property with blur which was making whole div blur. Then I somehow figured out the solution and used the same technique and my problem was solved and I learned the advanced css from you that's why I was able to solve the problem.

Ответить
Ishaq Abdulfatahi
Ishaq Abdulfatahi - 21.08.2022 07:33

This is awesome

Ответить
Alex Marin
Alex Marin - 20.08.2022 14:38

I was not aware that scoping was a thing in css too, that's awesome

Ответить