3 Box Shadow Tricks You MUST Know

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ต.ค. 2024

ความคิดเห็น • 99

  • @sumankathet2560
    @sumankathet2560 6 ปีที่แล้ว +54

    The thing I like about your videos is that you always do something that we could use in our real world projects.... I follow many other web developer youtubers but the content I find in your videos, I found in none...
    Thank you very much sir😊😊

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว +7

      Thank you so much for the kind words, and I'm really glad you're finding a lot of value in my videos! Thanks so much 😊

    • @ayazaslam1362
      @ayazaslam1362 2 ปีที่แล้ว

      U creat problems in your head and then make tutorials oh I think of 200px shadow and it's a problem.
      Who gives 200px shadow?
      There is command margin . 3:25

  • @The-Average-Gamer
    @The-Average-Gamer 6 ปีที่แล้ว +38

    The modal shadow trick is really cool, thank you.

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว +5

      No problem at all, glad you liked that one :).

    • @kirkanos771
      @kirkanos771 4 ปีที่แล้ว +3

      @@KevinPowell One of the reason i'm not using that trick and i add elements (an overlay) anyhow is because i need the shadow part to be clickable/triggering cancel/close events.

    • @Nerwesta
      @Nerwesta 4 ปีที่แล้ว

      @@kirkanos771 good point.

    • @kelvinclark3474
      @kelvinclark3474 3 ปีที่แล้ว

      So much learnt thank you

  • @bloxzyo
    @bloxzyo 3 ปีที่แล้ว +1

    Wooooow! This is the best box shadow series.... making them all inset to not affect the box model was a genius idea.....

  • @josema-boy7610
    @josema-boy7610 5 ปีที่แล้ว +9

    This video was definitely my cup of tea. Thank you very much. Cheers!

  • @jennyjanssen1499
    @jennyjanssen1499 3 ปีที่แล้ว +3

    Absolutely love the Peel effect. Thank you for showing how to get this done.

  • @christopherikpat5512
    @christopherikpat5512 6 ปีที่แล้ว +15

    thank you kevin. my confidence keeps getting better with your videos. much appreciated

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว +3

      That's great to hear Christopher! Keep it up 👍

  • @shubham0638
    @shubham0638 5 ปีที่แล้ว +5

    I never understood css this good in past year as much I learned from your channel in just 1 month.

  • @kamaboko1
    @kamaboko1 6 ปีที่แล้ว +4

    Given the sheer volume of content providers on TH-cam it is difficult to create one's own style, while delivering quality content at the same time. You have achieved both.

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว +1

      Wow, thank you so much kamaboko1! I really appreciate it!!! 😁

  • @andreaskarz
    @andreaskarz 3 ปีที่แล้ว

    Wow, the modal hack it's really amazing. Thank you

  • @gabiold
    @gabiold 5 ปีที่แล้ว +3

    Pretty surprised I did just found your channel! I like these great little things which are very useful in real-word building bigger things!

  • @thomasmeiller4455
    @thomasmeiller4455 5 ปีที่แล้ว +2

    thks. I learned just another cool things about box-shadow's functionality + features!

  • @nitram_nosnibor
    @nitram_nosnibor 3 ปีที่แล้ว

    Oh maaaan the peeled corners effect it pure genius!!! Loved this series, thanks Kevin.

  • @suthakharponnambalam9836
    @suthakharponnambalam9836 3 ปีที่แล้ว

    It's 2021 and here I am searching "Kevin Powell box-shadow prop", thanks to Kevin for all the amazing content!

  • @ralexand56
    @ralexand56 5 ปีที่แล้ว +2

    Beautfiul! Always wondered how that peeled corner effect was made.

  • @Nikkupikku123
    @Nikkupikku123 5 ปีที่แล้ว +1

    I am so glad I came across your channel . Thank you.

  • @AmirulIslam-gg2fn
    @AmirulIslam-gg2fn 6 ปีที่แล้ว +1

    Thanks a lot. I have learnt a lot about box shadow from your box shadow series.

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      Glad to hear that you've learned a lot 👍

  • @tomchrist4908
    @tomchrist4908 3 ปีที่แล้ว +2

    Another fun hack is that since the box-shadow starts at the edge of the box, so you can use a transparent div to create a window through a dark screen to the content below. Then absolute position and size your window to put it over content you want to highlight.

  • @FilipeFreire
    @FilipeFreire 4 ปีที่แล้ว

    man, it's amazing how much I learn from watching your videos.. this video was top notch! Thank you so much!

  • @Ben.Jacobsen
    @Ben.Jacobsen 4 ปีที่แล้ว

    Thank you!

  • @SmokeyNinja45
    @SmokeyNinja45 5 ปีที่แล้ว

    Your videos are truly the best I've seen. They are very helpful.

  • @Morrile1
    @Morrile1 6 ปีที่แล้ว +1

    As usual, as very useful video on how we can improve presentation. Many thanks 👍

  • @CarAudioInc
    @CarAudioInc 4 ปีที่แล้ว +1

    thanks so much for your effort, your videos are awesome, definitely my favorite webdev youtuber

  • @miloskostic2239
    @miloskostic2239 5 ปีที่แล้ว

    Thank you for this great lesson, the modal and the last trick are very useful.

  • @sevketiskender3229
    @sevketiskender3229 5 ปีที่แล้ว

    Thank you Kevin!

  • @Ninjer
    @Ninjer 4 ปีที่แล้ว

    GENERAL KENOBI. YOU ARE A BOLD ONE

  • @mareksawinski8225
    @mareksawinski8225 6 ปีที่แล้ว +1

    Awesome. Thanks Kevin.

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      Glad you liked it Marek :D

  • @LanFeusT23
    @LanFeusT23 4 ปีที่แล้ว

    Awesome video as usual!

  • @JacoblBroughton
    @JacoblBroughton 4 ปีที่แล้ว

    your channel is a goldmine

  • @SazikimiJaeger
    @SazikimiJaeger 6 ปีที่แล้ว

    These tricks are really handy. Specially that modal one. Thanks a lot man. No I can save my mark up a lot and my code will be more optimized. I really appreciate your teaching, very understandable and easily explained. Thanks again for making these awesome videos. I can learn a lot.

  • @seize2581
    @seize2581 4 ปีที่แล้ว

    Thanks ! I'll be sure to use them more often :)

  •  4 ปีที่แล้ว

    Really good video and explanation, thank you Sir, hope we can get more like this creative videos

  • @nagahumanbeingzooofparticl8836
    @nagahumanbeingzooofparticl8836 6 ปีที่แล้ว

    Very helpful for Beginners.. thanks man!👍

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      Glad you liked it :D

  • @abdelmonaemshahat412
    @abdelmonaemshahat412 6 ปีที่แล้ว

    thanks kevin it's pretty mini course on box shadow property . i hope u do more on border radius and gradient background .thanks again

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      I've got some things lined up for gradients, should be about a month or so away :D

  • @webdesigner8904
    @webdesigner8904 6 ปีที่แล้ว +1

    REally AWesome!

  • @ridaazzabi3233
    @ridaazzabi3233 5 ปีที่แล้ว

    Very Professional!!!

  • @nathancornwell1455
    @nathancornwell1455 4 ปีที่แล้ว

    i found that you can use box-shadow to make your buttons look like they are actually being depressed. you can make this effect by putting a box-shadow on your button then use the :active pseudo class and make the box-shadow offsets and spread smaller values....and can take it even one step further by using the transform: scale() to make it slightly smaller to like .9 or .95

  • @arampianist
    @arampianist 3 หลายเดือนก่อน

    The negative z-index makes the elements invisible… I think, unless you set a positive z-index on the parent element as well. I think setting isolation to isolate on the main element also makes it work..

  • @curtreyes00
    @curtreyes00 5 ปีที่แล้ว

    I recently used box shadow to create an aperture effect. I made an invisible circle with a giant black shadow. I thought it was pretty neat

  • @joeldcanfield_spinhead
    @joeldcanfield_spinhead 5 ปีที่แล้ว

    I love this kind of creative geekery.
    It's probably unintentional, but I've noticed in more than one video you refer to "vertical width" instead of "viewport width." Unless I'm missing something.

    • @KevinPowell
      @KevinPowell  5 ปีที่แล้ว

      Yup, I say vertical sometimes and don't catch myself.... My brain gets caught up on that "v" :\

  • @hattorihanzo5707
    @hattorihanzo5707 3 ปีที่แล้ว

    king of css

  • @UrraSergio
    @UrraSergio 5 ปีที่แล้ว

    15:51 I loved it.

  • @clevermissfox
    @clevermissfox 11 หลายเดือนก่อน +1

    Do gradients work on box shadows?

  • @nuwang1
    @nuwang1 5 ปีที่แล้ว

    Awesome

  • @fatach22
    @fatach22 6 ปีที่แล้ว

    Hi Kevin, I liked the page peel effect, however using z-index is problematic for me, as it conflicts with other elements (basically its behind EVERYTHING). Do you know of a hack to solve this one? :O

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว +1

      You can give the parent element a position: relative; That should change it's layering context (z-indexing is weird). You can layer the parent, and then it's pseudo elements are only z-indexed in relation to it, and not everything else (sort of). And very poorly explained by me here, hopefully it makes sense.

    • @fatach22
      @fatach22 6 ปีที่แล้ว

      Kevin Powell thanks! Will give that a try

  • @braveshine2579
    @braveshine2579 3 ปีที่แล้ว

    done

  • @AntoniGawlikowski
    @AntoniGawlikowski 2 ปีที่แล้ว

    "You need that? No."

  • @fufumitgemuese
    @fufumitgemuese 4 ปีที่แล้ว

    box-shadow on a modal-element is pretty useless besides the looks, because you still can interact with your page "behind" the dialog

  • @nikhiltyagi2223
    @nikhiltyagi2223 6 ปีที่แล้ว

    Video Request! Can you please do the next video on pure vanilla js slider(with slding transition) with navigation dots and prev next button without using any of those plugins like wow slider or owl carousel. Part one a full carousel header slider...and part 2 a content slider with 3-4 boxes in view at a time.

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      Definitely won't be the next video, but I could look at doing something like that in the future!

  • @kevinrichter9397
    @kevinrichter9397 6 ปีที่แล้ว +1

    Hey Kevin,
    thanks for this great tutorial. I just tried the peeling box shadow effect on my project. It works like a charm. Only when I hover the box itself with box:hover {transform: translateY(-10px) scale(1.05)}, the box::before and box::after are stacked on top of the box even though they have the z-index: -1.
    Here's the code: codepen.io/oceandiveloper/pen/ZMBLZb
    I read about the stacking context of transforms but I'm still not really sure what to do to solve this. Do you have a fix for that?
    Cheers, Kevin

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      Stacking context can be annoying. I do have a video on it that might help (ill link it at the end here, cause a bit of a long answer). When you put the :hover effect on your .box, it has a transform on it, and that transform gives your .box a new stacking context. So now, the ::before and ::after are not stacking according the the document's stacking context (where the -1 z-index will push them backwards), but will instead push it to the back of this new stacking context, so the only thing they are now behind is the h1 inside your box. Which is terribly annoying.
      Here is my video: th-cam.com/video/uS8l4YRXbaw/w-d-xo.html

  • @gosnooky
    @gosnooky 4 ปีที่แล้ว

    Neat

  • @wtfgreg1246
    @wtfgreg1246 ปีที่แล้ว

    I don't understand why when I copy this into an HTML/CSS file it doesn't work for me. The before/after don't show at all...

    • @wtfgreg1246
      @wtfgreg1246 ปีที่แล้ว

      If I add a rotate(0deg) to the parent it does though

  • @oiurehj
    @oiurehj 5 ปีที่แล้ว

    + Shadows...yeah, i know how to use shadows...
    - And then you can do this, or, if you want, you can do this...
    + Wait, what was that sorcery?

    • @KevinPowell
      @KevinPowell  5 ปีที่แล้ว

      Haha, glad that the video wasn't a waste of time :)

  • @coolgamer6458
    @coolgamer6458 6 ปีที่แล้ว

    can you make a video describing position???

    • @coolgamer6458
      @coolgamer6458 6 ปีที่แล้ว

      i am really confused about this

    • @coolgamer6458
      @coolgamer6458 6 ปีที่แล้ว

      well i want make a portfolio site.The nav bar is creating the problem..

    • @coolgamer6458
      @coolgamer6458 6 ปีที่แล้ว

      do you have any facebook id???

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว +1

      I have this video that sort of looks at the basics of it cool gamer: th-cam.com/video/P6UgYq3J3Qs/w-d-xo.html and this one where I do some more stuff with it: th-cam.com/video/lUaw-AA9HnA/w-d-xo.html
      Hopefully Jos van Weesel's been able to help you out, but if you have any questions let me know :)

    • @coolgamer6458
      @coolgamer6458 6 ปีที่แล้ว

      thank you.your video is helping me a lot.

  • @jenniferward6821
    @jenniferward6821 3 ปีที่แล้ว

    Ditto

  • @ek1311
    @ek1311 6 ปีที่แล้ว

    1 000 000 $ Man!

  • @angelcaru
    @angelcaru 5 ปีที่แล้ว

    7:20
    ONE HUNDRED VERTICAL WIDTH?!?

    • @KevinPowell
      @KevinPowell  5 ปีที่แล้ว

      I just wanted a really big value. It could be smaller, but you could set it to 1000vw and get the same result. Shadows won't cause any overflow issues, so if you want to cover the entire space, why not overshoot it?

    • @angelcaru
      @angelcaru 5 ปีที่แล้ว

      @@KevinPowell But you said VERTICAL WIDTH instead of VIEWPORT WIDTH

  • @devincenatiempo2238
    @devincenatiempo2238 6 ปีที่แล้ว

    I did a little analog clock project where the shadow changes with the moving hands for a realistic effect. It is very subtle but I think it works well.
    It uses JS and a little trigonometry.
    I’d like to have done this with purely CSS, but I don’t think it would be possible. I’d love someone to prove me wrong...
    dcenatiempo.com/cit-261/clock/

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      For some very basic proof of concept, I threw this together: codepen.io/kevinpowell/pen/ermOwV
      It's far from perfect as far as positioning things, I was more worried about the animation than anything else.
      I stole the shadow animation that you created, very nicely done with the viewport units in there, really dig that a lot!

    • @devincenatiempo2238
      @devincenatiempo2238 6 ปีที่แล้ว

      Thanks. Yeah its funny, It turned out being a lot more complex project than I imagined at the start.

  • @MuhammadAdnan-gx6rd
    @MuhammadAdnan-gx6rd 6 ปีที่แล้ว

    also teach javascript like this example

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      I don't know where to start with JS! It's a much bigger topic than CSS, I never really know how to approach it.

  • @summonshr
    @summonshr 6 ปีที่แล้ว +2

    You should check out stackblitz.com. It is an awesome development tool. As always, thank you for videos.

    • @KevinPowell
      @KevinPowell  6 ปีที่แล้ว

      That looks really cool, thanks for sharing it summon shresth!

  • @generationwolves
    @generationwolves 4 ปีที่แล้ว

    I wish I could intern for you.

  • @sumankathet2560
    @sumankathet2560 6 ปีที่แล้ว

    1st comment 😂😂

  • @ayazaslam1362
    @ayazaslam1362 2 ปีที่แล้ว

    U creat problems in your head and then make tutorials oh I think of 200px shadow and it's a problem.
    Who gives 200px shadow?
    There is command margin . 3:25

  • @teleleuinbedeleu
    @teleleuinbedeleu 6 ปีที่แล้ว

    Awesome