CSS Card with hover animation and mobile fallback

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ค. 2024
  • Another fun animated card that I created: • Animated card with HTM...
    Transition / Animation performance: / how-to-achieve-60-fps-...
    ⌚ Timestamps
    00:00 - Introduction to the project
    00:52 - The HTML
    03:40 - Starting the CSS
    08:47 - New HSL Syntax and gradients
    11:35 - Adding the pseudo-element
    17:32 - Styling the button
    19:19 - Little details
    21:50 - The animations
    31:23 - Timing the animations
    34:18 - Fixing keyboard navigation
    40:45 - Making it work on mobile
    46:01 - prefers-reduced-motion
    #css
    --
    Come hang out with other dev's in my Discord Community
    💬 / discord
    ---
    Keep up to date with everything I'm up to
    ✉ www.kevinpowell.co/newsletter
    ---
    Help support my channel
    👨‍🎓 Get a course: www.kevinpowell.co/courses
    👕 Buy a shirt: teespring.com/stores/making-t...
    💖 Support me on Patreon: / kevinpowell
    ---
    My editor: VS Code - code.visualstudio.com/
    ---
    I'm on some other places on the internet too!
    If you'd like a behind the scenes and previews of what's coming up on my TH-cam channel, make sure to follow me on Instagram and Twitter.
    Instagram: / kevinpowell.co
    Twitter: / kevinjpowell
    Codepen: codepen.io/kevinpowell/
    Github: github.com/kevin-powell
    ---
    And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

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

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

    Ah yes my daily dose of front-end improvement! It shall grant me better jobs ahead. 📈

    • @atlantic_love
      @atlantic_love 9 หลายเดือนก่อน +1

      Creating your own things will result in a better career, not copying others.

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

    26:59
    Other TH-camrs: Move face-cam on recording software so we can see what they're doing
    Kevin: padding-right it is

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

    I just discovered your channel and it's extremely exciting to dive into all of your videos because of how detail oriented you are in explaining what and why you do something. Even when you don't fully explain something, you throw us a lead for us to Google. Thanks a heap, Kevin!

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

    12:11 "Click the card there if you wanna die".
    Thanks for the lesson professor, very appreciated, but I'm not clicking that card!

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

      he meant dive 😂😂😂

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

      Legal encontrar você aqui, curto muito teu canal.

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

    That was a hell of a lesson. 99% of the tutorials indeed end on UI elements coming together, and that will be all.
    Great Job, Kevin. Love your work. Thank you very much.

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

    This video was super helpful and I’ve learned a lot! I’m trying to get back into web dev after stepping back for the last 7 years for family, and a lot has changed!!! watching this and others of yours has really given me the confidence that I can get my career back on track and know what I’m doing again. Thank you.
    I never even thought about tabbing on a card or if someone had animations turned off!

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

    This is the first time I'm this early to one of your videos, as I discovered your channel just last week. And you're already helping take my css to another level. Thank you so much for your content!

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

    The hover media query, focus-within pseudo-class, and reduced motion media query are awesome!

  • @Brandon-sr4qp
    @Brandon-sr4qp 3 ปีที่แล้ว +1

    Fantastic walkthrough, I love how you went about it a little more realistically. I'm always a huge fan of your explanations behind why things work in the way they do, it really helps when it comes time to actually apply whatever it is into my own projects. Thanks, Kevin!

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

    please make more of these! these are perfect for strengthening my css skills. tyvm!

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

    I really enjoyed the tutorial, took me longer than usual to eventually get it right, and I want to try the Animated Card next. Thank you Kevin for the really educational, informative and fun video. I look forward to seeing more videos and hopefully expand my knowledge on CSS. You are awesome!

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

    Hey Kevin, I'm more off a backend development but always watch your videos to improve a little bit of my css skills. You have amazing teaching skills, also super clear and to the point. Thanks for all the content!

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

    Thanks for an excellent video, Kevin! :) You've really helped me this past year, inspiring me to become more creative in my front end solutions, and your attitude towards learning is so wholesome and easy-going that I find it very easy to understand your topics. I am starting my first full-stack job right now, and I will be taking your css/js-tips with me! Thanks

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

    I totally like the way you explain things and the line of thought to get thru all the required steps, great work and thank you so much

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

    It has been so long since I have touched anything related to programming, it's so cool that you can now do such things just with CSS.
    Awesome content!

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

    Every time you drop a new video, I watch it and then go spend hours modifying every site I've made to reflect things I've learned
    Superb videos! Absolutely LOVE them
    Thank you so much!

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

    When you said you had a lot of editing, I didn't expect an amazing 50 minute video on animated cards! It even has 5 animated TH-cam cards throughout haha

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

      Haha, yeah it was a longer one to put together, but I had fun with it :)

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

    Great tutorial! I like the fact that you actually run into problems. It becomes very much a realistic scenario one probably will have.

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

    I am literally doing this in my project right now and oh boy was I looking for a video like this. Thanks a lot!

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

    Loved this one Kevin! Most tuts online solve the overlay with absolute positioning, however your transform solution was a loooot cleaner. Thanks a bunch!

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

    I just discovered your channel like yesterday but I've watching your vids non-stop. Your tutorial is spot on and super easy to unserstand, super thoughtful. I felt like you should have 1M subs compare to other channels that I've watched. What's an underrated channel. Thanks very much sir.

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

    Next level tutorials!!
    I noticed the first bit of the video had a lot of echo, but once you dove into the code, your audio was perfect.

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

    Amazing video Kevin, it is super interesting and so well explained. Thank you so much for make me love CSS being a backend developer :).

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

    Your tutorials is always outstanding. Thanks so much Kevin for making youtube fun.

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

    Nothing better than start the day with some daily dose of animation and css

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

    This was amazing, very interesting and fun to watch!

  • @AmitKumar-bz6we
    @AmitKumar-bz6we 3 ปีที่แล้ว

    This was a very informative and helpful video. Looking forward to seeing more such videos!

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

    we can use *transparent* in linear gradient.
    I use something similar to this 👇
    background : linear-gradient(transparent 20%, rba(0,0,0,0.75) 90%);

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

    Man I'm watching this to relax after a long day of front ahah, and this is truly amazing, thanks for your work, inspires me a lot

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

    I just needed to show my appreciation for this channel I am learning a lot, really thanks.

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

    I really learnt a lot of this video! Thank you Kevin!
    I'm starting my first job as a developer in June and am preparing for it by watching your helpful videos.

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

      @Kansai Japan Walker Great, thank you. Of course it is a struggle with the imposter syndrome from time to time but it is also a constant increase in skill and knowledge.

  • @jasonma1904
    @jasonma1904 2 ปีที่แล้ว +1

    The best meaningful CSS tutorial that cares about a11y and other situations. Thank you for your awesome work.

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

    Fantastic content as always Kevin! I learn something new every time even when I think there's nothing left to learn with CSS. This time the @media (hover). A great little tool to remember for the future.

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

    That was really nice. Thanks man. You are doing very good job !

  • @JuanCastro-C
    @JuanCastro-C 2 ปีที่แล้ว

    This is AWESOME Kevin, thank you very much for this content

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

    Awesome video, learnt so much! Thank you!

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

    @media(hover) - where have you been all my life?!? What an awesome tutorial!
    I love watching other channels creating these wild animations, but I don’t implement them because of various a11y & mobile concerns. I think you’ve just resolved every single one of them in this video.
    Instant sub. Thanks for the great content!

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

    Gosh, I love your videos. Very nice tutorial. I realy like how you play with the delays.

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

    Seriously, I never thought this deep. Thanks for this awesome lesson.

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

    Such amazing implementation, You got your well-deserved sub! Btw these videos helped me a lot :D

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

    Great stuff. SO much better than multiple media queries

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

    I'm a beginner web designer (just learning as a hobby for now, but hope to get good enough for a career transition in the future) and I just wanted to say even though there's a lot being covered here which I don't know or understand I'm just super impressed and fired up seeing what's possible, and what I might be able to accomplish some years from now if I keep learning! Really great stuff! Actually ended up applying 'card:hover > transform: scale' to a very simple webside I am working on just to spruce it up a bit and make it feel more interactive after seeing you do it here! I'm a long way away from tackling some of the more challenging concepts, but even simple things like that have made a big difference for me!

  • @istiakjisun9233
    @istiakjisun9233 10 หลายเดือนก่อน

    YOU'RE THE BEST KEVIN! THANKS FOR THIS AMAZING AND 100% USEFUL CHANNEL. THIS CHANNEL IS AN ABSOLUTE GEM

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

    love what you do Kevin

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

    Hey Kevin, love the videos. Especially this one.

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

    Incredible tutorial Kevin. Thanks!

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

    PLEASE PLEASE PLEASE keep doing this videos! This is awesome

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

    One thing I've been a fan of lately is doing a --transition variable which is just the second half of the transition syntax (leaving off what is being transitioned) - so I do --transition: .2s ease-in-out; which then lets me do things like transition: color var(--transition) and then later in my CSS do transition: background var(--transition) which equates to even transitions throughout the site!

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

    I learned so much. Thank you. This is amazing stuff.

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

    Blimey Kevin - you truly are a CSS God!
    I'm finding the more you learn, the more there is to learn 😩

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

    I love this content, thank you man

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

    So many good tips in here. Really good stuff.

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

    Mind blowing video. Many many new things learned.

  • @jimmyj.6792
    @jimmyj.6792 3 ปีที่แล้ว

    Awesome explaination 😍😍😍 so so interesting 👌 thanks a lot Kevin for this 😀😀

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

    His videos are always awsm. It shows his expertise in web Dev.

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

    I really liked the way you code it in steps where "you figured out" that it doesn't work on mobile and fix it afterwords!
    That is the situation for me most of the time, and it's frustrating where I often redisgn the whole thing. But knowing these "tricks" will hopefully reduce the redesigning. 🙂

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

    incredible tutorial, thanks Kevin!

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

    You're great at explaining CSS!

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

    Great job Kevin. As usual, I learned alot.

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

    Amazing video !! Learnt a lot. Thank you !!

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

    Awesome video. Thank you.

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

    Nice one Kev! A lot of good CSS features wrapped up in one ! I mean no more comma's :O hover media query's!! and that elegant use of selectors!! I always assumed that you couldn't use hover and ::after together ! Thank man great fun

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

    Outstanding lesson, and a very important one as the web is now accessed more and more on mobile devices, perhaps more than PC's nowadays.

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

    I learned a lot of things with this video , thanks Kevin

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

    Omg I've never seen anyone explain css like you you really make the css easier

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

    Damn it. I discovered you few days ago. You’re awesome! Thanks for the explanation !

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

    omg, im programer student in brazil, and this guy is helping me a lot with my css learning, thanksssss

  • @avramitra
    @avramitra 2 ปีที่แล้ว +1

    I'm an embedded systems developer, but you sparked my passion for front end develpment. It's my new hobby now.

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

      So glad to hear that!

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

    great video friend, I really liked the animations and I learned a lot about them too, thanks for encouraging them to make everything easier :D greetings from Argentina

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

    Beyond just basics. Great Kevin 👍👌

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

    I have just subbed. I want to switch from data science to dev. I will be watching your vids a day just to groove my front end.

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

    Awesome tips, thank you!

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

    great its help a lot in responsive layout

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

    Thank u mr Kevin
    really useful content

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

    Just amazing

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

    Thanks, Kevin! :)

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

    Awesome!

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

    Thanks for the last 10 minutes espacially :)

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

    THIS is a great video solving real-world challenges making sites more attractive. I design city and county websites and we are often looking for new ways to create "Services Panels" or "Cards" in this case. Very timely and useful. Thank You.

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

    Really nice video very informative, some css property I know but not used yet... Now I use it...Thank you for sharing...

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

    Thanks for this guide, very informative. Subscribed!

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

    This is amazing!

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

    Thank you that was very helpful.

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

    Definitely the best channel for beginner web developers

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

    Looooved this video! 🙏🏻

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

    I mean, that's awesome! Of course, SASS is a saviour in those (ie. all) scenarios

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

    it's so helpful and your voice is amazing

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

    Thanks Kevin, very nice animation. Tomorrow I’ll suggest this animation to my designer 😁. By the way cool DJI drone on picture.

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

    this is amazing, thank you very much for sharing this, you may not like being called the king of css, but you have been dubbed by us, your fans, the king of css

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

    I'm still at the logarithm and logic phase, but these videos will help a lot in the future. Thanks a lot.

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

    THANK YOU SO MUCH !

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

    Thanks! I really learn a lot!

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

    Great great great tutorial. Thank you for your efforts.

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

    Amazing video KEVIN, and I realized how time-consuming and nerve-wrecking this job is...

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

    Learned alot from this video...idk these many thing about media query...

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

    You’re awesome CSS master!

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

    Kevin, if it wasn't for you. I wouldn't know CSS, keep up the great work. Just know you're changing peoples lives/careers. Thank you.

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

    You are great man !

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

    this is amazing

  • @yousifal-raheem5061
    @yousifal-raheem5061 3 ปีที่แล้ว +4

    Cool video. If you want to wrap your content with an element, you can highlight the block of code, bring the command palette and type "wrap with abbreviation". And then you write emmet. Something like ".card-content > .something-else"