3D Tilting Card Effect with Mouse Tracking // HTML, CSS & JS

Поділитися
Вставка
  • Опубліковано 19 лис 2024

КОМЕНТАРІ • 98

  • @Notification099
    @Notification099 Рік тому +51

    Please don't give up I swear your channel is great

    • @shwethalok186
      @shwethalok186 7 місяців тому +1

      He ain't even giving up bruh

    • @hameeeed5992
      @hameeeed5992 6 місяців тому

      @@shwethalok186i thought same

  • @skillzorskillsson8228
    @skillzorskillsson8228 Рік тому +29

    There is a library called TiltJS but it's in jQuery but there is also VanillaTilt that is in just normal javascript code. Incredibly easy to use to get that tilt effect :) I always go with that. But thanks Kevin for showing how to do it without a library !

    • @DEBO5
      @DEBO5 Рік тому

      thank you, saved me 30 mins

    • @ken4179
      @ken4179 Рік тому

      Hey man I'm new to webdev and I tried installing VanillaTilt using npm install. Afterwards I followed their instructions on how to use it but nothing happens. Any ideas as to why?

  • @romeojoseph766
    @romeojoseph766 Рік тому +3

    Will watch this for sure after I have finished my playlist on js

  • @HHJoshHH
    @HHJoshHH 11 місяців тому +1

    Kevin, you’re the mentor I need! I’m especially loving your css battles!!! Wish I could get some time to pick your brain but I’m sure it’s probably already in another video.😂

  • @timothyrodriguez3182
    @timothyrodriguez3182 10 місяців тому

    YOURE THE CSS GOD!!!! We love the content

  • @NOTHING-en2ue
    @NOTHING-en2ue Рік тому

    one of the powerful teachers of css thanks a lot ❤

  • @Linuxdirk
    @Linuxdirk Рік тому +4

    In a world where the first solution is to use a framework and SASS to do even the simplest things I love seeing people doing plain CSS and HTML to achieve complicated things!

    • @leonstone3443
      @leonstone3443 Рік тому

      the more i realize what you can do with just Vanilla, makes me just want to continue learning vanilla lol

    • @giakhanhvn2mc
      @giakhanhvn2mc 2 місяці тому

      web bloat at its finest, those soydevs really don't learn huh

  • @igorigor806
    @igorigor806 Рік тому +2

    Thanks, Kevin!

  • @NenadoDyadya6
    @NenadoDyadya6 Рік тому +1

    I always share your videos with the group chat cuz they awesome

  • @kill_switch_101
    @kill_switch_101 3 місяці тому

    tnx really really tnx, been looking for this effect my whole life

  • @codehal
    @codehal Рік тому

    Amazing video sir!

  • @steviewonder580
    @steviewonder580 Рік тому +1

    Perfect, glad my blackmail worked Kevin.

  • @mohamedamineboukraia5528
    @mohamedamineboukraia5528 Рік тому +2

    Kevin you made me fall in love with css, thank you!

  • @nicmackenzie
    @nicmackenzie Рік тому

    I always think i have a grasp of CSS then i watch Kelvin Powell's videos then realise i know nothing

  • @jakubfrei3757
    @jakubfrei3757 Рік тому +2

    I love your videos Kevin, thx for all your work

  • @_tanzil_
    @_tanzil_ Рік тому

    Because of you, CSS is fun for me😎

  • @norbertkovacs3447
    @norbertkovacs3447 Рік тому +3

    Hello Kevin! I don't have words for how much I appreciate your content. I've learned so much with your videos! I wonder if you could do a Ghost theme developement series? : ) I think there are people who would be very much interested in the headless CMS endeavour.

  • @Phlep1111
    @Phlep1111 Рік тому

    Once again an amazing video... Thank you so much. For me you took so much frustration out of CSS...

  • @atbmts6
    @atbmts6 Рік тому

    This is seriously so cool

  • @ryannicholls8127
    @ryannicholls8127 9 місяців тому

    king kevin thank you

  • @bhagyalakshmip3660
    @bhagyalakshmip3660 5 місяців тому

    Sir u r so cool for this
    Really appreciate ur content 👍

  • @BO-ny5mm
    @BO-ny5mm Рік тому

    Omg this is soooo interesting! Thanks Kevin ⭐

  • @whatisthis__95
    @whatisthis__95 Рік тому +4

    Kevin, although the video is awesome as always, I like much better when you write the code in real time. I don't know, it give a more real feel, and gets into the memory better I think. Thanks for everything you do.

    • @KevinPowell
      @KevinPowell  Рік тому

      Thanks for the feedback! Definitely experimenting a little with this approach, and I think I need to refine it a little bit for it to work better. It won't be in every video though!

    • @javabeanz8549
      @javabeanz8549 Рік тому

      ​@@KevinPowell I can see why you used a lot of copy paste, this would have been an hour long video, and not as many people would have watched the whole thing.

    • @the_meaning_of_love
      @the_meaning_of_love Рік тому

      @@KevinPowell I love this new way soooooo much!!!!!!

  • @k16e
    @k16e Рік тому

    `border-radius: inherit`? Whoa, I did not know that until today!

  • @darshandev1754
    @darshandev1754 8 місяців тому

    Great tutorial
    Try increasing the z offset to 2000px, you will not be disappointed

  • @ecodersofficial
    @ecodersofficial 6 місяців тому

    Amazing. I think you should also add transition to it and not tilt it if not hovered

  • @FlorinPop
    @FlorinPop Рік тому

    Amazing video Kevin! Thank you 🙏

  • @TomaszBrukarczyk
    @TomaszBrukarczyk Рік тому

    Brilliant! Thank you!

  • @MrVurtan
    @MrVurtan Рік тому

    Great video. Love you video, those are always helpfull and I learn something new!

  • @kasszz92
    @kasszz92 Рік тому

    Awesome effect, I also just noticed that you're using that nvidia eye tracker thing. Your eye is moving in front of your glasses in the first 45 seconds :P

  • @samadanvarov4264
    @samadanvarov4264 Рік тому

    If you want to learn css just watch Kevin's video. Thanks for another great tutorial sir.

  • @MangoDev_
    @MangoDev_ Рік тому +1

    What if you tried re-creating the 3D cards from the Steam game library? It's a normal 3D tilt, but it has lighting as well. A cool bonus challenge could be re-creating the group effect as well, as it has a bunch of cards at an angle _inside_ the element (with lighting and all). As a CSS sort-of-beginner, it'd be cool to see how to do lighting effects in the context of a UI and how to make an element become a sort of decorative .

    • @KevinPowell
      @KevinPowell  Рік тому

      In my Library, I don't see any tilting? The image sort of zooms in a little, and there is a bit of a lighting change, but that's it? It's also one card at a time, and not groups? Is it on the website, or in the steam app? I'm looking in the app, but the website seems to have even less going on? 🤔

    • @MangoDev_
      @MangoDev_ Рік тому

      @@KevinPowell The tilting is very subtle (for me the sides only go out a few pixels or so), but it is there; if you have Low Performance Mode enabled, then this is the only effect you will really see. About the groups thing, I think the thing I'm talking about is officially called "Collections" if that helps. "steam library collections" on Google Images should give you an idea of what I'm trying to talk about. Sorry for the miscommunication, that's my bad.
      The main thing that I don't know how it was done was putting the whole grid at an angle behind the button, as well as the randomly-colored gradients overlaying the whole thing. I'm not super great at CSS though, I'm still a beginner just trying my best. Sorry for spending so much of your time.

  • @the_meaning_of_love
    @the_meaning_of_love Рік тому

    Fascinating

  • @Evil_E_ye
    @Evil_E_ye Рік тому +2

    Show more javascript including project please. I like the css one too but i am currently deepdiving js so just want some learning experience. From you😊
    Due to your grace, now my css skills are pretty solid too.

  • @theeomulamuzi3613
    @theeomulamuzi3613 Рік тому

    This right Here is a work of arrt

  • @aram5642
    @aram5642 Рік тому

    Look ma, I was featured!

  • @arshad1781
    @arshad1781 Рік тому

    Thanks

  • @k16e
    @k16e Рік тому +3

    This has been a good course of "Follow the Mouse" to me. Maybe, Mr. Powell, consider doing a full course of these sorts of things for some fancy subtle CSS + JS animations. Thanks in advance. PS: we could pay for it, trust.

  • @krushitbhatt1842
    @krushitbhatt1842 Рік тому

    This is awesome! I've noticed this effect on many websites and have been really eager to learn how to achieve it in Figma. Does anyone happen to know the steps to create this effect in Figma?

  • @personcalledjames
    @personcalledjames Рік тому +1

    To be honest, I actually prefer the effect produced by the CSS-only implementation

  • @maksymkaraszewski7467
    @maksymkaraszewski7467 11 місяців тому

    does he use an older version of chrome? when i try the background: multiply and i hover over it it only shows me a compatibility with some old ass browsers and it doesnt work in the latest chrome or opera for me

  • @goodshiro10
    @goodshiro10 Рік тому +2

    seriously css Einstein 👀

  • @uboxtech
    @uboxtech Рік тому

    framer motion can do it also

  • @JarPlace
    @JarPlace 5 місяців тому

    wheres the 3d card video mentioned at the end?

  • @MeridaBros
    @MeridaBros Рік тому

    why is the display thing not going to the center when I set it to center and the background is basically broken, the mouse movement also isn't working

  • @markwerle
    @markwerle Рік тому

    Really like this video. Quick question... one of my kids is showing some interest in learning to build websites and in particular they were drawn to css. What is your setup that we see in your videos regarding software. VS code (obvs), but how do you connect the live refresh? An emulator of some sort? Would love a walk through of how you work so I could help my kid learn to try things like your videos show. BTW, they love your videos.

  • @JulienReszka
    @JulienReszka Рік тому

    very cool

  • @thevikingsock8527
    @thevikingsock8527 Рік тому

    Hate it so much that I can never just copy the relevant parts of Codepens into Wordpress. It always either breaks the page or doesnt function at all and I dont get it. I edited the necessary css and made sure everything gets loaded in properly.

  • @saifhaq4998
    @saifhaq4998 8 місяців тому

    The spinning video isn't linked :( and i can't find it

  • @dusterthefirst
    @dusterthefirst Рік тому

    At 12:26 there seems to be some clips out of order as the video goes back to when you linked to the js from the html.

  • @nashgaming23
    @nashgaming23 Рік тому

    @Kevin, would it be possible for you to make video with an image that tilts where the mouse is pointing inside the image. I saw this on Steam (the game store), where they tilt the steam card images if your mouse is inside the image and wherever the cursor is pointing. It also enlarges the image a little bit and then depending on where your mouse points inside the image, the image tilts in that direction. I really think this is awesome but no idea how to do this. Would you be able to do this in CSS with Wordpress and if you could post video.
    ps, i am new to web designing, doing it for about 2 years now, used to do it old school using HTML and CSS but found Wordpress to be so much faster. So i would like to do this in wordpress using CSS. Thank you.

  • @blueprint7000
    @blueprint7000 Рік тому +1

    I believe non Javascript solutions is a thing of the past . Even my fridge runs javascript

    • @goodshiro10
      @goodshiro10 Рік тому +3

      Just showing that there is a way to make it without javascript too, but you're correct javascript is everywhere

    • @javabeanz8549
      @javabeanz8549 Рік тому

      ​@@goodshiro10 As someone that fought against JavaScript for years, I now use it, but minimally for most of the sites that I work with. Still, some of the things that I run into are so heavy with JavaScript, that they slow my i7 Ultra book to a crawl. So use JavaScript wisely.

  • @naamloos1337
    @naamloos1337 Рік тому

    are there any videos on performance regarding pure css OR css + js for something like this?

  • @thevikingsock8527
    @thevikingsock8527 Рік тому

    Is there also a link to the JS solution?

  • @technoph1le
    @technoph1le Рік тому +1

    min-block-size: 100dvh?
    Interesting property and value instead of regular `min-height: 100vh`. Wondering what is the difference and why? 🤔🤓

    • @ssygon2
      @ssygon2 Рік тому +1

      Unit dvh excludes the user agent's interface(unlike unit vh) & updates as the current viewport height changes.
      e.g. On a mobile, scrolling down the down a page, the mobile URL bar moves out of your screen, then the viewport height changes.

  • @QwDragon
    @QwDragon Рік тому

    11:13 Why variabls defaults to 0? I thenk, the whole property defaults to transform: initial; which is transform: none;

    • @KevinPowell
      @KevinPowell  Рік тому +1

      Yeah, I spoke a bit too fast there. It's an undeclared custom property, so it pretty much sees it as an invalid property until you give it a value :)

  • @ico0z
    @ico0z Рік тому

    I'm just curious can we count with counter children within css and calc the rotation dynamically?

    • @KevinPowell
      @KevinPowell  Рік тому +1

      That would be pretty awesome, but pretty sure there's no way to do it

  • @abdulsalphan
    @abdulsalphan Рік тому

    ❤️

  • @carloautor
    @carloautor Рік тому +1

    Why im getting
    Uncaught TypeError: element is null

    • @KevinPowell
      @KevinPowell  Рік тому

      Could be a typo :)

    • @Phlep1111
      @Phlep1111 Рік тому +1

      move the script tag where you link the javascript file to the bottom of the dom tree? At least I forgot to do that and had the same error...

  • @qm3ster
    @qm3ster Рік тому

    Was really hoping you'd generate a much larger grid with a preprocessor :v

    • @KevinPowell
      @KevinPowell  Рік тому +1

      Haha, definitely could have. PUG + Sass would make it a bit easier 😅

  • @LokiDaFerret
    @LokiDaFerret Рік тому

    Hmmmm can you use :is( ) on pseudo elements? A la pre:is(:: before, :: after) { } ?

  • @PaulKinlan
    @PaulKinlan Рік тому

    TIL inset

  • @The_Super_Musician
    @The_Super_Musician Рік тому

    SOURCE CODE

  • @daguttt
    @daguttt Рік тому

    "min-block-size" Whatt???

  • @wasifalam545
    @wasifalam545 Рік тому

    Hi Kevin! can you please make a video on how to place a svg pattern on hero section just the top of everything, or tell me if you have already uploaded something like this. please help...I really need it.

  • @naveenramkumar6123
    @naveenramkumar6123 Рік тому +1

    Not the biggest fan of the CSS only solution, if I am to be totally honest

    • @KevinPowell
      @KevinPowell  Рік тому +5

      It's not the most practical one, that's for sure,. More about showing that it is possible, rather than it being the best approach 🙂

  • @Kimi-xp2th
    @Kimi-xp2th Рік тому

    Love u Kevin. (no homo)

  • @Treetrunks41775
    @Treetrunks41775 Рік тому

    I love this channel so much, it feels like every video has such awesome tips to being a better programmer 🫶🏽

  • @vujvvuc7673
    @vujvvuc7673 Рік тому

    4:35

  • @romeojoseph766
    @romeojoseph766 Рік тому

    what is pre tag?

    • @KevinPowell
      @KevinPowell  Рік тому +2

      preformatted, so it keeps all the formatting, including tabs and spaces. Very common for code blocks, since we need to keep all of that :)

  • @siddharth8911
    @siddharth8911 Рік тому

    sir can you please upload some more frontendmentor challenge it helped me a lot please sir upload it on week basis

    • @KevinPowell
      @KevinPowell  Рік тому

      Plan to do them every now and then, but definitely not every week, I got other stuff to do too :D

  • @mathis-meth4229
    @mathis-meth4229 Рік тому

    This man is the reason why people think UA-cam education will replace formal education

    • @KevinPowell
      @KevinPowell  Рік тому +1

      Haha, thanks so much! (might help that I taught in a formal setting for a long time 😉)

  • @darminrc1933
    @darminrc1933 Рік тому

    the lost son of linus torvalds???