Incredible scroll-based animations with CSS-only

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

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

  • @santoshparker8681
    @santoshparker8681 11 หลายเดือนก่อน +49

    We all are blessed to have a teacher like you kevin .

  • @KOBE42__
    @KOBE42__ 11 หลายเดือนก่อน +75

    I’m beginning to love CSS so much more these days. I really appreciate your work in keeping us in the loop with the latest CSS functionalities. 👌

  • @cmukama
    @cmukama 11 หลายเดือนก่อน +175

    This is exactly what I needed to refactor out an old JS animation library. The creator left 3 years ago and nobody knew how to deal with it. Thank you Kevin

    • @KevinPowell
      @KevinPowell  11 หลายเดือนก่อน +20

      Just watch out for browser support, since it's far from perfect! The polyfill helps, but as I show near the end, it isn't perfect.

    • @hungry_khid1007
      @hungry_khid1007 11 หลายเดือนก่อน +3

      Huh? U dont know javascript?

    • @cmukama
      @cmukama 11 หลายเดือนก่อน

      @@hungry_khid1007 It's 5MBs of minified javascript. My 12 years of JS experience are useless here

    • @lian1238
      @lian1238 11 หลายเดือนก่อน +5

      You can have javascript update a css variable in your DOM whenever the user scrolls. The variable can be absolute pixels or a percentage of the total height.

    • @mamlzy
      @mamlzy 2 หลายเดือนก่อน

      is it AOS?

  • @m.arslansarwar9449
    @m.arslansarwar9449 11 หลายเดือนก่อน +29

    You've made me love CSS. You've no idea how much you're helping us with your content.

    • @albedesigns
      @albedesigns 7 หลายเดือนก่อน

      Absolutely! Kevin is my go to guy to understanding & learning the more advanced CSS.

  • @steelrazor
    @steelrazor 2 หลายเดือนก่อน +2

    Big kudos for mentioning "prefers-reduced-motion". It's such a small adjustment and an easy (essential) accessibility win in my eyes.

  • @MrWhiteav6
    @MrWhiteav6 9 หลายเดือนก่อน +5

    Kevin, I just wanted to say I've been watching your videos since I first started learning to code. I've moved on to Mobile App development with RN but I still build websites and need help with CSS and you are the GURU! You are also just a pleasure to learn from, I love your personality. Keep being you man! Thanks for all the help!

  • @rebell570
    @rebell570 11 หลายเดือนก่อน +10

    It's so cool to see more and more animation functionality becoming built-in to CSS. 👍🏻

  • @alirahmani5601
    @alirahmani5601 11 หลายเดือนก่อน +9

    Really appreciate the longer content; keeping the quality even as far as shooting after editing, thanks for that :)

  • @simonswiss
    @simonswiss 10 หลายเดือนก่อน +1

    I finally understood the difference between "cover" and "contain" thanks to this video!

  • @AnthonyGruba
    @AnthonyGruba 9 หลายเดือนก่อน +4

    This is so good, 5 minutes and I know exactly what I was looking for! I have to watch everything if just 5 minutes gave me that much

  • @ellisj98
    @ellisj98 11 หลายเดือนก่อน +7

    I can’t believe this wasn’t in CSS before in hindsight.. it’s such a good feature. It’s also great to have it native in CSS as it can be easily disabled and enabled depending on the users motion settings.

  • @k16e
    @k16e 11 หลายเดือนก่อน +3

    The MDN of CSS on YT. How otherwise would I know of this sort of CSS-orcery but for Mr. Powell! Thanks, sir!

  • @havefun5519
    @havefun5519 8 หลายเดือนก่อน +1

    Nice step-by-step tut.

  • @mouhamadalmounayar2199
    @mouhamadalmounayar2199 8 หลายเดือนก่อน

    I love this dude because he actually explains things.

  • @randomforest_dev
    @randomforest_dev 11 หลายเดือนก่อน +2

    The future is bright for CSS! thanks for the video.

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

    POWER of CSS, thanks for this demo.

  • @leifn
    @leifn 11 หลายเดือนก่อน +4

    Thank you for this great introduction! Especially the part about the animation ranges would be a pain to figure out by oneself.

  • @erikvanzanen
    @erikvanzanen 9 หลายเดือนก่อน +2

    Ok, here I am using a Jscript to make an image move from left to right, from a certain point you scroll by on the page. This is great

    • @rafelgrau
      @rafelgrau 6 หลายเดือนก่อน

      Just that you will not be able to use it until at least one more year, that is if you put it in a commercial webpage

  • @udit.roshan
    @udit.roshan 10 หลายเดือนก่อน +1

    This makes EVERYTHING so easy now.

  • @ScottMackey
    @ScottMackey 11 หลายเดือนก่อน +3

    Just an amazing demo and explanation Kevin!! It's so nice to see the css is close to where is should be, handling all the basic animation and visuals that javascript had to do for css. Thanks again 🙂

  • @mimoduocss
    @mimoduocss 11 หลายเดือนก่อน +6

    I was looking for viewport based animation timeline and it was view() the entire time! My brain is too mushy for MDN docs, thank you!

  • @WUOTH
    @WUOTH 11 หลายเดือนก่อน +6

    Thank you and perfect timing, just what I need for an ongoing project :)

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

    learning so much so quickly here

  • @hw5622
    @hw5622 10 หลายเดือนก่อน +2

    Amazing! I was looking for how to do this with simple css. Thank you so much!

  • @carbellsarfo
    @carbellsarfo 8 หลายเดือนก่อน +1

    This was so helpful Kevin.
    The part about animating the hero section, The animations are not working, when I copy the same code and put it anywhere else, they work perfectly.

  • @adrianperdomollerena5884
    @adrianperdomollerena5884 7 หลายเดือนก่อน

    Dude you are awesome, Ive always loved CSS but you make it even cooler to be a front end dev, now I can talk about reducing javascript and interception observers at work so we can add more nice animations

  • @trinidadfaccini1006
    @trinidadfaccini1006 8 หลายเดือนก่อน

    thank you for this tutorial, amazing explanations
    loved that you mention the small -but big- considerations that we must have when creating a website so that it is accessible and navigable for everyone

    • @Cognitoman
      @Cognitoman 8 หลายเดือนก่อน

      Safari and Firefox is a no go

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

    Do you experience a horizontal scrollbar issue when scaling the background image up in "the hero area animation" section of this video? It seems that we need to set overflow to not be hidden in order to use the view() and scroll() CSS functions. This animation appears to distort layouts by increasing the width of the container of the background. (Chrome on Windows.)
    Great content. Thanks for your efforts.

  • @tomcat1112k
    @tomcat1112k 11 หลายเดือนก่อน +2

    thank you for the amazing thoroght video Kevin. Loved it.
    i'll use the banner animation in my university assignment. and I'll obviously give you credit for this in the reference.

  • @PacificDev
    @PacificDev 11 หลายเดือนก่อน +3

    too late to watch it at 1am, but I know I'll need this at some point so saved and liked 👍! I should pay you a coffee at some point for all tips and tricks I learned from you.
    Thanks for the amazing work Kevin 🙌

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

    thank you! needed this to get started on animation

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

    this is just what i need right now. thank you

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

    Thank you, Kevin. I'm definitely trying these out.

  • @brobinbraauw5523
    @brobinbraauw5523 10 หลายเดือนก่อน +1

    this video is so good, thanks a bunch! Going to start using it for my own projects right away!

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

    I really learn a lot from your channel. Thank you for your generous hardwork.

  • @gabuhl9509
    @gabuhl9509 5 หลายเดือนก่อน +1

    Thanks a lot Kevin!! , Top most valuable CSS information!! Thanks a lot for sharing!!

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

    I'm assuming scroll looks at the stacking context by default, it's neat you can pass it root.
    Thanks a lot for the video! You're the reason I've been keeping up with new CSS features.

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

    Learnt a lot of things. Thanks sir.

  • @albedesigns
    @albedesigns 7 หลายเดือนก่อน

    This is perfect... exactly what I was hoping to be able to do without JS. CSS really is amazing!

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

    This is the most amazing tutorial I've ever watched. Amazing feature and the way you expalained it made it looks easy. Thank you ❤

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

    that was awsome, exciting to learn and again Kevin ,thank you

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

    Amazing what you can achieve with only CSS these days! Thanks, Kevin

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

    Love it! Great post as usual Kevin!

  • @MikkoRantalainen
    @MikkoRantalainen 7 หลายเดือนก่อน

    Great video! All I can say about this feature is that it sure took a long time until a standard method to do this appeared. And it'll still take some time until it will be supported in all browsers.
    And if you want to see support for this in all browsers sooner, DO NOT USE POLYFILLS. When end users see that their browser cannot show fancy effects, they will switch to better browsers - which puts a lot of pressure to the developers of the browser that doesn't yet support these effects to implement them.
    Remember that you must always make the content usable without scroll effects because some users opt out of animations because of health issues so you should definitely not try to force effects on them.

  • @kevinfisher7032
    @kevinfisher7032 11 หลายเดือนก่อน +2

    Wow CSS is really kicking it these days! On a side note it’s interesting that the “forget-that-we-do-it-this-way- now” cycle is getting shorter and shorter. It’s seems like only yesterday we were struggling with intersection observers and now….oh, forget all that... we have a few lines of CSS now :-)

  • @___rituraj___
    @___rituraj___ 11 หลายเดือนก่อน +9

    Hey man, when it comes to CSS , you always rock and outshine others🚀🔥
    So why don't you curate a structured playlist by arranging all your made videos in such a way that a beginner can learn CSS from basics to advance and such playlist will also get a good reach.
    It will also help self taught programmers to learn from one place instead of hopping from one resource to another.

  • @jenstornell
    @jenstornell 6 หลายเดือนก่อน

    Best video I have seen this week. Congrats! 🎉

  • @avi12
    @avi12 11 หลายเดือนก่อน +2

    12:39 Rather than wrapping the CSS with a media query, it's easier to set the animation as intended and then add in a reduced motion media query that resets the animations on the page

  • @0muhammedirfan
    @0muhammedirfan 10 หลายเดือนก่อน +2

    Thanks alot bro❤

  • @myfreedom42
    @myfreedom42 8 หลายเดือนก่อน +5

    that dont works on firefox... so unable to use it in production. Do you know when FF will add this CSS update ?

  • @corykey9187
    @corykey9187 7 หลายเดือนก่อน

    Wow I discovered line-height: 1cap and this in one week. Game-changing times. Thanks!

  • @gholapyash
    @gholapyash 10 หลายเดือนก่อน +1

    Thanks sir, This is what I was looking for and this is gonna help me to make my portfolio much better without using that old library 🙏🏻

  • @MusfikaAkter-ki6rk
    @MusfikaAkter-ki6rk 20 วันที่ผ่านมา

    Wow kevin. I just love this . Thank you so much.

  • @emmanuelmantilla1465
    @emmanuelmantilla1465 11 หลายเดือนก่อน

    You're great Kevin, who would thought now we can use CSS instead of intersecting everything

  • @LorenzoGasperoni
    @LorenzoGasperoni 7 หลายเดือนก่อน

    This video teach me so many new features. AWESOME! Thanks a lot!

  • @DrewDoesDevops
    @DrewDoesDevops 6 หลายเดือนก่อน

    Hello Kevin!
    Thank you for the video!
    I do have a suggestion:
    For newbie coders that are watching videos like these, can you take some time to explain some of these concepts to those of us not fully familiar with them yet? I get that some of the concepts may and will make sense the further along us newbies would get, however, that would be SUPER helpful.
    Keep up the AWESOME WORK!

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

    Great stuff, will use it for sure 👍👍👍

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

    I truly appreciate Your css skills. Also, great teaching approach! Thanks for sharing :))

  • @AlexanderBelov-y8o
    @AlexanderBelov-y8o 11 หลายเดือนก่อน

    What a time to be alive!

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

    You're the goat Kevin

  • @Officialdave99
    @Officialdave99 6 หลายเดือนก่อน

    This is so wonderful kevin!

  • @AniketEdot
    @AniketEdot 6 หลายเดือนก่อน +2

    Hey Kevin! thanks for this video. It really was informative. However i noticed when i used the animation-timeline: view() property, it seems to work on all devices, EXCEPT safari and ios/ipad os. Is there anyway to fix this? or do i have to use js ? Thanks

  • @sanjaux
    @sanjaux หลายเดือนก่อน +2

    When you typed @animation I thought there was something new I didn’t know about lol

  • @codewithsehran
    @codewithsehran 6 หลายเดือนก่อน

    That's the video what I'm searching for 1 days i sawed it before in somewhere!

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

    Man, I swear on my head: in the first 30 seconds you summarized everything I have been looking for during the whole afternoon without finding decent and concise results. Now I came here two minutes ago and boom: problem solved. God bless you 🥲

  • @АлександрЧеремных-ц9б
    @АлександрЧеремных-ц9б 11 หลายเดือนก่อน

    You are great person, keep doing, you make people happier

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

    You are making great points that are in-trending Thank you @Kevin

  • @skyfall2984
    @skyfall2984 7 หลายเดือนก่อน

    Thank you very much for what you teaching us here.. god bless you

  • @josephm.6676
    @josephm.6676 11 หลายเดือนก่อน

    @Kevin great topic choice. 👏 🎉 Love to see this!

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

    Thanks for sharing this! Kevin you are awesome!

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

    you saved us legend

  • @avivperets7360
    @avivperets7360 7 หลายเดือนก่อน

    Damn i can watch your work for days haha,
    Thanks alot you gave me lots of inspiration from this video

  • @explorster
    @explorster 15 วันที่ผ่านมา

    This is so sick

  • @kokapeli
    @kokapeli 11 หลายเดือนก่อน

    This is so awesome! Great video, thank you!

  • @rain-2263
    @rain-2263 11 หลายเดือนก่อน

    Kevin makes everything possible with CSS

  • @rodrigonoales
    @rodrigonoales 11 หลายเดือนก่อน +2

    Hi Kevin, great video... question, did you test this with native lazy load for the images ? I mean, does lazy load break the visual effect in any way, like jumps in animation or it still works smoothly as it loads the assets? Thank you !!

  • @MikkoRantalainen
    @MikkoRantalainen 7 หลายเดือนก่อน

    I think the "avoid animations" @media query should be written to be NOT "reduce". This allows it to work correctly if the prefers-reduced-motion has other values but "no-preference" and "reduce" in the future. For example, if the preference allows opt-in for "fancy" animations in the future query for no-preference would disable animations for those users, too.

  • @marvell8862
    @marvell8862 4 หลายเดือนก่อน

    i love the way you laugh when you teach

  • @EmmanuelB
    @EmmanuelB 11 หลายเดือนก่อน

    that's incredibly useful and powerful! Thanks!

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

    CSS is really evolving, I remember days we had to support IE 6 !

  • @Developer_Yusuf
    @Developer_Yusuf 11 หลายเดือนก่อน

    I am confusing. No words. Kevin is the best

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

    Hello! Thanks for this explanation!
    BTW There is any way to fix 'header-image-animation' if sporadically it doesn't work? I noticed after quick scroll to the top the opacity is still set to 0. When I open WebTools it's appears with correct opacity.

  • @Thevetat_
    @Thevetat_ 10 หลายเดือนก่อน +1

    Not having the markup for this made it hard to follow along with, otherwise great video.

  • @m12652
    @m12652 11 หลายเดือนก่อน

    Excellent as ever… wouldn’t it be cool if you could have the background image fixed vertically, then zoom in and fade on scroll, then start zooming into the next background image. Reverse the zoom for scrolling back up.

    • @KevinPowell
      @KevinPowell  11 หลายเดือนก่อน

      You probably could, actually! I didn't include it in here but I've been playing around with fixed things using position: sticky that worked really well. Not what you're describing, but I have a feeling it would be possible!

    • @m12652
      @m12652 11 หลายเดือนก่อน

      @@KevinPowell I look forward to more then thanks 👍

  • @AlThePal78
    @AlThePal78 6 หลายเดือนก่อน

    I like the grow from the middle I think it is all cool

  • @JasonAul
    @JasonAul 10 หลายเดือนก่อน +4

    Is there a repo for this demo you showed us?

  • @ন.ই.রিমন
    @ন.ই.রিমন 9 หลายเดือนก่อน

    Oh Kevin!! You are the boss❤❤.

  • @SrinivasReddy07
    @SrinivasReddy07 7 หลายเดือนก่อน

    CSS God @Kevin Powell.
    This is awesome, learned a lot. Thank you Kevin.

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

    Why not say up front that it doesn't work with Safari and Firefox?

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

    very cool! Thank you for teaching this!

  • @paweliszka44
    @paweliszka44 11 หลายเดือนก่อน

    I was totally at that point "ohh @animations why I miss that exists LOL" you made my day :)

  • @khaledfarghly6480
    @khaledfarghly6480 11 หลายเดือนก่อน

    Man You have just choked me by the fact that there is a something new in CSS called @animation and I didn't hear about it.

  • @yanikkendler
    @yanikkendler 11 หลายเดือนก่อน

    i really dont know if this works out for you better then I expected.. but even tho i am a programmer and like doing it i dont wanna watch a movie on the new css feature.. 30 minutes like this one is really the max for me. Id much prefer a showoff and tutorial split

  • @alexway303
    @alexway303 2 หลายเดือนก่อน

    Cool stuff. But it was difficult to understand or replicate horizontal scroll animation (16:04 - working with scrollbars that are not the main viewport), cause essential part of the code is behind the scenes.

  • @d3vwannabe
    @d3vwannabe 4 หลายเดือนก่อน +1

    I literally paused the video when I saw @animation and started googling... took me a few minutes and got distracted by some other stuff before coming back to the video. 😂😂 This is what I call 'premature optimization' lol

  • @AzuldeAndromeda
    @AzuldeAndromeda 6 หลายเดือนก่อน +1

    I’m loving this tutorial but is there anyway to make it work on Firefox and safari? I’ve tried many things but it seems impossible. I hope you have an answer 🙏

  • @ΝικόλαοςΤζουνάκος
    @ΝικόλαοςΤζουνάκος 10 หลายเดือนก่อน

    awesome video again!

  • @outpost31737
    @outpost31737 11 หลายเดือนก่อน

    Thanks Kevin!

  • @GarethField
    @GarethField 11 หลายเดือนก่อน

    I love that he leaves in the naming whoopsies and everything, it’s such an affirming, “*You* *can* code!”

  • @molotovtiel
    @molotovtiel 9 หลายเดือนก่อน

    Going to have to try some of these great tips. I'm curious what would happen if the entry and exit "cross over." For example if viewed on a phone held landscape with a large image that starts exiting before it fully enters. Assuming you'd need media queries to handle.