Why are there two ways to make shadows in CSS? box-shadow vs filter: drop-shadow()

Why are there two ways to make shadows in CSS? box-shadow vs filter: drop-shadow()

Kevin Powell

4 года назад

46,803 Просмотров

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


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

Joe DiSalvo
Joe DiSalvo - 27.05.2020 22:55

Great tutorial. I was curious if you could still do multiple shadows using filter:drop-shadow(), and turns out you can, but it's worth noting the syntax is slightly different than box-shadow:

filter: drop-shadow(0px 0px 6px blue) drop-shadow(0px 0px 20px red);

rather than:

box-shadow: 0 0 6px blue, 0 0 20px red;

Just noting for anyone else curious.

Ответить
Robin Padaplin
Robin Padaplin - 01.08.2023 07:55

IS THERE ANY WAY I CAN DO THIS THE SAME IN PREMIERE PRO?

Ответить
Mannika
Mannika - 25.07.2023 20:21

I think you have to first remove the image background then you can apply drop-shadow(), otherwise it will work as box-shadow only. This is so important part of drop-shadow() concept but nobody is pointing it out.

Ответить
Bruh Moment
Bruh Moment - 28.01.2023 08:51

Brilliant. I wonder if drop-shadow's spread radius is supported by browsers now

Ответить
GENTLEMEN FX
GENTLEMEN FX - 09.11.2022 03:33

Nice video, but how can we put the shadows on our blog posts?

Ответить
Kendall Johnson
Kendall Johnson - 19.10.2022 19:58

Great video!

Ответить
Aref Javanbakht
Aref Javanbakht - 02.08.2022 20:03

This video was extremely helpful..

Ответить
Silent Phil
Silent Phil - 18.07.2022 05:03

That color information "that wouldn't be useful" was total gold! thank you very much mate! BTW love your content

Ответить
Daniel Afolayan
Daniel Afolayan - 27.06.2022 19:35

Great stuff Kevin. I've been battling this since but now it's all clear. Thanks 😊

Ответить
Jair Mercado
Jair Mercado - 20.06.2022 18:39

gran video

Ответить
Victor A
Victor A - 09.04.2022 11:55

So on mobil is hard to see the code. Too small

Ответить
Kyle_ESO
Kyle_ESO - 19.01.2022 18:57

Your videos are a great compliment to the other online courses I'm taking for CSS. It seems whenever I have questions regarding whether or not something can be done in CSS, I find the answer with you. Thank you!

Ответить
Casper Casperios
Casper Casperios - 17.12.2021 16:44

Thanks for the color tip. You make my life so much easier

Ответить
Visual Shadow
Visual Shadow - 19.10.2021 20:23

Yesssssssss

Ответить
Nanogalaxy
Nanogalaxy - 01.08.2021 15:38

But why do you feel it's weird to have two types of shadows? It's BOX shadow and it's supposed to be a shadow of the box surrounding it. What else do you expect? Anyway it's new knowledge for me that filter drop shadow existed. Thanks for that 😅

Ответить
Craig Burton
Craig Burton - 19.04.2021 15:59

Not sure it's so bad that box shadow ignores contents, at least this way we have one method to give shadow to contents and one to the box, I can see occasions when we'd want both

Ответить
Thamarai Selvan
Thamarai Selvan - 08.03.2021 23:21

Hey kevin... Does filter-shadow have option like box-shadow: inset 0 0 10px black;

Ответить
Roman Sattler
Roman Sattler - 06.03.2021 00:37

The positioning wasn't off when you used text shadow and filter shadow in combination. Instead you got a shadow of your shadow.

Ответить
Héctor Vásquez
Héctor Vásquez - 22.02.2021 06:08

The gotcha is pure gold! You just nail what I needed. Thanks!

Ответить
Paul McCann
Paul McCann - 29.01.2021 19:43

Note that on drop-shadow(), the 'inset' keyword isn't allowed either.

Ответить
MobiusCoin
MobiusCoin - 21.11.2020 02:33

Damn, the scariest thing in the world to a dev is when the specs/docs say one thing and the reality is something else. I'm gonna have nightmares about this.

Ответить
Ten Minute Tokyo 2
Ten Minute Tokyo 2 - 05.10.2020 03:03

Why do all these web standards and frameworks keep proliferating without anyone consolidating them?

Ответить
Mithrandir
Mithrandir - 06.09.2020 11:47

Learned something new today 💖

Ответить
Agustin C.
Agustin C. - 22.06.2020 09:58

Nice video man

Ответить
Deepesh Singh
Deepesh Singh - 10.06.2020 03:55

That backdrop you have is amazing! 😮

Ответить
Manga Chasers
Manga Chasers - 08.06.2020 03:44

Hey Kevin, Do you have an html css tutorial from beginner to advance?

Ответить
jessica wu
jessica wu - 05.06.2020 21:16

Great tutorial ! :)

Ответить
Milton David
Milton David - 02.06.2020 23:02

Nice and straight to the point.

Ответить
digigoliath
digigoliath - 02.06.2020 16:47

Nice! Thanks for the tips.

Ответить
Charles Small
Charles Small - 01.06.2020 01:12

Thank you Kevin. I still learning The videos are very helpfull,

Ответить
G A
G A - 31.05.2020 23:08

Kevin, That was absolutely beautiful, Thank you so much for putting this out for us.

Ответить
atarixle
atarixle - 31.05.2020 22:13

before I watch this video, let me guess the catch! multiple drop-shadows shadow the everything including previous drop-shadows (as it is a filter that builds up on previous filters), white multiple box-shadows always drop the shadow of the object (box) ignoring previous box-shadows. This messes up the geometry of shadow-effects (e.g. 3D-effects using box/text-shadow, where the next shadow is one pixel more away from the object ... using the drop-shadow each shadow is exactly 1px away from the already filtered object ... I accidently copy/pasted a set of text-shadows into a drop-shadow-command before I got this) ... ok, I now watch the video. Now, after I watched the video: I think could tell you something new.

Ответить
obadah
obadah - 31.05.2020 13:04

THX
very much

Ответить
T00er7 936
T00er7 936 - 30.05.2020 15:53

Good tips. Thank you Kevin :) hi from japan

Ответить
Spimy
Spimy - 29.05.2020 17:40

Hey Kevin, I was wondering if you could make a video on how to prevent FOUC. It's annoying me :<

Ответить
Rafał Jastrzębski
Rafał Jastrzębski - 29.05.2020 12:13

Wow that was exactly why I dropped this filter thing few days ago. Thank you very much :)

Ответить
LawnCrack
LawnCrack - 29.05.2020 02:31

Thanks Kevin!

Ответить
CreativeJE
CreativeJE - 28.05.2020 20:50

You are awesome

Ответить
sadam hussain
sadam hussain - 28.05.2020 19:11

Nice one

Ответить
unloco
unloco - 28.05.2020 17:48

I just used drop-shadow in production, I guess watching your video was a great investment XD

Ответить
J. almadhaji
J. almadhaji - 28.05.2020 15:05

Very useful video .. thank you

Ответить
msv [manikanta srivishnu]
msv [manikanta srivishnu] - 28.05.2020 14:08

Thank you kevin

Ответить
Rajat Goyal
Rajat Goyal - 28.05.2020 05:21

Thanks man, you are clearing my doubts, please upload more videos on how we can make components responsive

Ответить
OLIWEB
OLIWEB - 28.05.2020 02:45

Kev, It's always interesting to watch your videos. I'm not sure if you're gonna watch this, but thank you for the free Responsive layouts course 🥰

Ответить
Hüseyin GÖKTAŞ
Hüseyin GÖKTAŞ - 28.05.2020 02:12

You are awesome. Love these types of contents.

Ответить
Michael Oosthuizen
Michael Oosthuizen - 28.05.2020 01:20

GIF is clearly pronounced 'gif' :-)

Ответить
Front-End Animal
Front-End Animal - 28.05.2020 01:00

may be, with that property we will make neon?

Ответить