How To Create Performant CSS Animations

  Рет қаралды 60,194

Web Dev Simplified

Web Dev Simplified

Күн бұрын

🚨 IMPORTANT:
Learn CSS Today Course: courses.webdevsimplified.com/...
As a web developer have you ever wondered why your animations are so choppy? It seems like you are only changing minor parts of the animation, but it never quite looks right. Well in this video I will be showing you exactly why your animations look choppy, how to improve them, and how to use the dev tools in Chrome to test your animations.
🧠 Concepts Covered:
- How the browser renders CSS
- How to optimize CSS animations
- How to use Chrome dev tools
- Which CSS properties to animate
🌎 Find Me Here:
My Blog: blog.webdevsimplified.com
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
#CSS #WDS #CSSAnimation

Пікірлер: 148
@ed1nh0
@ed1nh0 3 жыл бұрын
transform and opacity are the only two params we should animate. This is the rule #1 for the subject. 👍🏼
@randerins
@randerins 3 жыл бұрын
Valeu pela dica!
@sapindersingh1165
@sapindersingh1165 3 жыл бұрын
admirable advice!
@toddhoward5947
@toddhoward5947 3 жыл бұрын
What about transition: all Nav links color change is a simple way to create interaction
@migueldomingos4570
@migueldomingos4570 3 жыл бұрын
And colors
@ed1nh0
@ed1nh0 3 жыл бұрын
@@toddhoward5947 transitions are not animations. They just appear to behave like so.
@nsharma4981
@nsharma4981 3 жыл бұрын
This was one hell of an eye opening video! What I love about this channel is, it has a balanced mix of videos that cater to popular demands, and videos on underrated but important topics like this. All the data in the performance tab is no more like hieroglyphics to me, lol. Thanks Kyle! 😄
@thethmuucodes
@thethmuucodes 2 жыл бұрын
Thanks Kyle. I've always wondered why animations on some popular sites often lag and seems uncomfortable to look at. Now you've explained me precisely.
@creativedeveloper6921
@creativedeveloper6921 3 жыл бұрын
Great stuff Kyle! I can't find any other contents out there explains this better than you did! Keep it up!
@vugarbakhshalizade2826
@vugarbakhshalizade2826 Жыл бұрын
I love your short and precise explanations. Thank you for it!
@PeterFelis
@PeterFelis 2 жыл бұрын
Thanks for this! Next to the animation lesson, I was not aware that those tools are available in the browser. thank you so much
@jorden123
@jorden123 3 жыл бұрын
Thanks for this important video! A personal story - I studied Electrical Engineering, I've worked as a DevOps Engineer (damn you Covid-19) and now I use my free time to learn new WebDev things such as html, css, js, vue.js 3 node.js (front/back and techs)... Combined with my knowledge in docker containerization, you can actually make a living (as a freelance), which is something I strive to reach as a side job (just in case). Thanks for creating these wonderful tutorials and videos that simplify my understanding of reading when I dive into different documentaries and need another point of view to get it better.
@nurantarlan
@nurantarlan 3 жыл бұрын
Super super cool content Kyle, thanks a lot for explaining )
@CodingUnited
@CodingUnited 3 жыл бұрын
Another thing to note is that changing the height of the page also negatively affects perfomance, but devtools doesn't include that in the data. Therefore, you're always best to keep your website the same height 👍
@rommelphilipafurong
@rommelphilipafurong 3 жыл бұрын
Thanks so much for this sir Kyle, its now clearer to me why am I using transforms and opacity. Im so grateful I'm on the right track but I dint get any further explanations like this. Keep it Up Sire. Have a great day and happy coding !
@rockfox5
@rockfox5 2 жыл бұрын
OMg this is so awesome to discover as part of my learning. I will definitely keep this in mind. Thank you! I am going to smash that subscribe button right now!
@justsharesumn
@justsharesumn 3 жыл бұрын
mind blown! great video learnt so much.
@oapostrocon
@oapostrocon 3 жыл бұрын
Thanks Kyle -- this was a super helpful video. For whatever reason, yt doesn't seem to promote it as much as some of your others, but I definitely want to add my vote to the other folks asking for more content where you drill into Dev Tools.
@mauriciosotoa8130
@mauriciosotoa8130 3 жыл бұрын
please more of these details. You explain it very well. thanks
@stills2359
@stills2359 3 жыл бұрын
I was wondering why my animation was choppy on my phone but super smooth on my computer. Thanks!!
@ultradevx
@ultradevx 3 жыл бұрын
Cool animation tutorial. Lot to learn from it.
@MichaelM1800
@MichaelM1800 3 жыл бұрын
Thanks for the detail explanation of cpu/gpu usage behind the scenes.
@WebDevSimplified
@WebDevSimplified 3 жыл бұрын
Glad it was helpful!
@ServanFICHET
@ServanFICHET 3 жыл бұрын
Got hypnotized by the text going up and down during 12min... 😅
@allenhebert4918
@allenhebert4918 3 жыл бұрын
I’m hypnotized by Kyles Voice, he hides his hands so you can’t see if theres a wedding ring????
@StephenRayner
@StephenRayner 3 жыл бұрын
Excellent video, thank you very much.
@chhavimanichoubey9437
@chhavimanichoubey9437 3 жыл бұрын
saved my life right there man.
@maorben3313
@maorben3313 3 жыл бұрын
Thank you! Can you do more videos on performance analyzing with Chrome?
@waynehendricks1529
@waynehendricks1529 3 жыл бұрын
Awesome info mate
@MissLysreign
@MissLysreign 3 жыл бұрын
Super interesting and helpful, thank you!
@WebDevSimplified
@WebDevSimplified 3 жыл бұрын
Glad you enjoyed it!
@codingjitsu
@codingjitsu 3 жыл бұрын
Great VIdeo as always.
@TheThepusherman7
@TheThepusherman7 3 жыл бұрын
Fantastic video!
@usama57926
@usama57926 3 жыл бұрын
Amazing amazing....... I've never seen such an amazing video about CSS........ Thank you sir!
@WebDevSimplified
@WebDevSimplified 3 жыл бұрын
Thank you! I am glad you liked it.
@MrMelquize
@MrMelquize 3 жыл бұрын
Thanks, nice content!
@SimplifiedOfficial
@SimplifiedOfficial 3 жыл бұрын
Great Video!
@developerhabits
@developerhabits 3 жыл бұрын
Great video!
@b3hr4d
@b3hr4d 3 жыл бұрын
Really helpful tips, can you make video about svg and canvas animation performance ?
@12thevil
@12thevil 2 жыл бұрын
Thank you
@hameem6845
@hameem6845 3 жыл бұрын
Man you REALLY know your shit. Very informative. Thanks a lot
@crackribswithdante7807
@crackribswithdante7807 3 жыл бұрын
That sound at 8:19, I thought my computer speakers just exploded or something Great video though
@sanskaarpatni9137
@sanskaarpatni9137 3 жыл бұрын
that tch sound that happened at 7 57 and one more timee Damn scary shit
@foxjonesofficial
@foxjonesofficial 3 жыл бұрын
Weird
@IdleAtre
@IdleAtre 3 жыл бұрын
Very good video, thanks.
@WebDevSimplified
@WebDevSimplified 3 жыл бұрын
You are very welcome!
@mohamedyoussef8835
@mohamedyoussef8835 Жыл бұрын
Awesome Tutorial ++++++++++++ thank you 😃
@rajeevsinxh
@rajeevsinxh 3 жыл бұрын
great video :D
@leopolon
@leopolon 3 жыл бұрын
dear kyle. Any opinions about animating the filter prop? or Color versus filter? ty
@forhadrh
@forhadrh 3 жыл бұрын
Great! 👍
@rameezroot5225
@rameezroot5225 3 жыл бұрын
Awesome ☺️
@pushpakrai5303
@pushpakrai5303 3 жыл бұрын
Best video. And best channel 😍
@metanevis
@metanevis 3 жыл бұрын
awesome content
@girizhh
@girizhh 3 жыл бұрын
where did u host ur html file? And did u coded it or wordpress?
@crazycode2578
@crazycode2578 3 жыл бұрын
Oh my god, That is reason why my side-bar is broken. Thank you so much!
@joe5head
@joe5head 3 жыл бұрын
what if you duplicate and overlap your whole sites dom layout with different layers of colours and then just modify the opacity on hover to 'change' the colour? like having a blue navbar on top of an orange navbar and then on hover make the blue navbar transparent
@usama57926
@usama57926 3 жыл бұрын
Please make more videos like this one..............
@ayushk729
@ayushk729 3 жыл бұрын
Is position property good for animations or it makes the animation sluggish like the margin property does??
@calmniverse9941
@calmniverse9941 Жыл бұрын
Good explanation. I think there is a website which list all the css properties and the side effects they generate when changed. let me know if anybody remember it.
@ReactWithMasoud
@ReactWithMasoud 3 жыл бұрын
I also have a programming channel, but you are doing great and really enjoyed watching your videos. I wish you could give me some tips how to make my channel better because my retention rate is below 15% in average for all my videos...
@buckschneider7973
@buckschneider7973 3 жыл бұрын
What about left or right property?
@nithinkottary9578
@nithinkottary9578 3 жыл бұрын
nice video
@ridl27
@ridl27 3 жыл бұрын
ty.
@code.cracking
@code.cracking Жыл бұрын
Dear Kyle, thanks for providing such a great content, Do you have a udemy course?
@paulzwecker9252
@paulzwecker9252 3 жыл бұрын
Hi Kyle! I've watched a lot of your videos and built an application i would like to deploy. I've heard you recommending heroku but i'm struggling a lot. Could you maybe make a tutorial, in which you launch an application using node/express/mysql/external api's/Mongodb etc.? Deploying the code itself is not the problem, what gives me headache is all the stuff that's linked to it :D Thank you for making all these helpful videos and keep up the good work!
@nsharma4981
@nsharma4981 3 жыл бұрын
Watch the setup video in the Full stack Mybrary app playlist from this channel, I think that might be exactly what you're looking for
@AbhishekKumar-vo7wr
@AbhishekKumar-vo7wr 3 жыл бұрын
Please do a video on Async.autoinject
@AwsmBuff
@AwsmBuff 2 жыл бұрын
8:19 That sound really shocked me O.o
@sajTempler
@sajTempler 3 жыл бұрын
I think you could do translate3d for hardware acceleration
@YuriLifeLove
@YuriLifeLove 3 жыл бұрын
I try to record and there's some rendering going on, then I try the paint flashing thingy and owh... It's the .gif
@VANTABL4CK
@VANTABL4CK 3 жыл бұрын
Make a tutorial on particles.js please
@hachaluwami
@hachaluwami Жыл бұрын
transform and opacity is the first css animation😁😋😛
@vinterbjork4128
@vinterbjork4128 3 жыл бұрын
Are you sure that there is not a difference even on your computer in the beginning? The margin animation looks unclear and relativly choppy, the transform one looks more smoother, the text is more crisp. Seems to change even before you reload the page, but I assume your VS code updates the css when you save?
@win_ini
@win_ini 3 жыл бұрын
you make making a calculator seem like cake, even if the video is 40+ minutes long
@win_ini
@win_ini 3 жыл бұрын
next time please make a tutorial on how to make a fake command line in javascript
@LemonDust13
@LemonDust13 3 жыл бұрын
Like the slogan: "No Stack to Full Stack" 😂 but P.S. - would've probably been best to not have the moving text up the whole time you were tryin to do the intro because I could barely focus on what you were saying, and I don't even have A.D.D. or anything. That being said, very informative & exactly the kind of video I was looking for.
@RyanFaeScotland
@RyanFaeScotland Жыл бұрын
Haha, was thinking the same thing! Started getting motion sickness half way through, was almost relieved for the ad break!
@destroreact5706
@destroreact5706 Жыл бұрын
So, no rainbow colored websites if I want performance? :(
@akhilbandari
@akhilbandari 3 жыл бұрын
I didn't even knew these things existed lol
@usama57926
@usama57926 3 жыл бұрын
please create a tutorail on *Next.js*
@jeremyashcraft2053
@jeremyashcraft2053 3 жыл бұрын
Wait do people actually animate using margin?
@sanket6023
@sanket6023 3 жыл бұрын
I have never used margin to animate😂😂😂 idk y would anyone would use it.....
@Al_Gonzo
@Al_Gonzo 3 жыл бұрын
Yes, I did. And Sanket, why would that be so hard to understand lol? What is your first thought when you want to move a div to a certain location? Because mine is margin.
@nilpo
@nilpo 3 жыл бұрын
@@Al_Gonzo when I move something, I change its position. That's what top, bottom, left, and right are for. Margins cause all kinds of things to recalculate.
@cyber_chris
@cyber_chris 3 жыл бұрын
if the proportions need to be recalculated, transition wouldn't work, that's also the reason why it has a heavier cpu usage
@taylorremigi6238
@taylorremigi6238 3 жыл бұрын
Now I need a tutorial on how to animate the content of an h2 tag that changes via useState every few seconds. I can’t get any of the react-transition-group API’s to do anything!!!
@Ryzza5
@Ryzza5 3 жыл бұрын
So animating margins is like opening a complex Word document and holding down the Enter key in the middle of the doc - everything below has to push down. And animating translate is like dragging a textbox around with layout options set to just sit on top of anything else without moving it around.
@WebDevSimplified
@WebDevSimplified 3 жыл бұрын
That is a great analogy
@seshankkm5202
@seshankkm5202 3 жыл бұрын
hi kyle can u make a course on sass
@WebDevSimplified
@WebDevSimplified 3 жыл бұрын
That is something I have on my list of potential upcoming courses. I am focusing on JavaScript right now, though.
@luckyvanilla388
@luckyvanilla388 3 жыл бұрын
How about transition?
@aglowkeys
@aglowkeys 3 жыл бұрын
Loved the video, thanks! Didn't know about those testing tools. Here's more reading material if anyone's interested: developers.google.com/web/fundamentals/performance/rendering
@sparshgupta8078
@sparshgupta8078 3 жыл бұрын
use transform instead of top left 🤔top left got painted lately as compared to transform
@govindsinghrathore4671
@govindsinghrathore4671 2 жыл бұрын
DONE
@michaelwu1996
@michaelwu1996 3 жыл бұрын
If someone want to learn more about, here is a list of the css property's triggers csstriggers.com
@KlethonioFerreira
@KlethonioFerreira 6 ай бұрын
You didn't mention the downsides of using translate. (I don't know if there is any!)
@forhadrh
@forhadrh 3 жыл бұрын
Kyle, why don't you give visitor the opportunity to leave comment in your blog? That would be nice.. you know :) I love commenting 😁👌
@avi12
@avi12 3 жыл бұрын
Kyle, that's not the whole story If you do: position: relative; And animate "top", it will act like "translateY" but perform like "margin-top"
@gabrielv1856
@gabrielv1856 3 жыл бұрын
So if you use position: absolute and animate top it will act and perform like translateY ?
@avi12
@avi12 3 жыл бұрын
​@@gabrielv1856 I'm saying "act" as to how Kyle defined the movement itself "translate" will move the HTML element without affecting the other elements "top"/"left" will also do that "margin" will move the element while affecting the other elements However, when it comes to performance, for some reason, "translate" will be lightweight, whereas "top"/"left" and "margin" will be heavyweight
@adrymuffin
@adrymuffin 3 жыл бұрын
I'm in love with you
@jggabayno
@jggabayno 3 жыл бұрын
@14 comments from philippines!
@Owen-by7db
@Owen-by7db 7 ай бұрын
I now a css learner
@ujjwalpandey4721
@ujjwalpandey4721 3 жыл бұрын
A simplified video on c++ pointers, please. These pointers confuse thousands of people.
@venkatesh2788
@venkatesh2788 3 жыл бұрын
Please make how to download KZbin video using JavaScript or node js Please.........
@tilakmadichettitheappdeveloper
@tilakmadichettitheappdeveloper 3 жыл бұрын
Like if u agree 90% of you who have been doing web dev for more than 3 years never clicked on performance tab
@trancelated
@trancelated 3 жыл бұрын
Meanwhile firefox users be like: 🤨🤔🤯😵
@AbhinavKulshreshtha
@AbhinavKulshreshtha 3 жыл бұрын
Why, ff also has similar performance monitoring tool. Infact, only benifit of chrome dev tools is its debug protocol integration. Other than that, ff dev tools is actually better.
@trancelated
@trancelated 3 жыл бұрын
@@AbhinavKulshreshtha few features mentioned in this video are not available natively in firefox
@Al_Gonzo
@Al_Gonzo 3 жыл бұрын
@@trancelated Like what exactly?
@trancelated
@trancelated 3 жыл бұрын
@@Al_Gonzo From top of my head, CPU throttling, segregated performance summary, detailed performance monitoring are missing from Firefox
@Al_Gonzo
@Al_Gonzo 3 жыл бұрын
@@trancelated so you never used Firefox?
@rameezroot5225
@rameezroot5225 3 жыл бұрын
Hey Kyle Give me A Heart ☺️🤭😁
@WebDevSimplified
@WebDevSimplified 3 жыл бұрын
Only because you asked nicely.
@gokulapriyan7851
@gokulapriyan7851 3 жыл бұрын
I am from tamil nadu...my favourite teacher on KZbin is Kyle ...soon i will become the CEO of google and then meet Kyle😉😉
@sidheshwartiwari9834
@sidheshwartiwari9834 3 жыл бұрын
Finish your CSS , Google is waiting eagerly for a CEO who knows CSS
@user121304
@user121304 3 жыл бұрын
@@sidheshwartiwari9834 lol ! Good one!
@adityasingh0117
@adityasingh0117 3 жыл бұрын
CAN I GET A ❤
@chandrakant6283
@chandrakant6283 2 жыл бұрын
Basically don't go Fortnite all over the layout, just use Opacity & Translate.
@swapnilkuwar7040
@swapnilkuwar7040 3 жыл бұрын
Second comment
@godisgreatagu
@godisgreatagu 3 жыл бұрын
first to comment
@philome4811
@philome4811 2 жыл бұрын
The video starts right off with accusations.. I plead guilty :(
@mascatrails661
@mascatrails661 2 жыл бұрын
I had to scroll away from the video. Couldn't keep watching the layout bouncing up and down.
@rishisid
@rishisid 3 жыл бұрын
I BET KYLE WILL NOT GIVE A HEART TO ME
@888ian2
@888ian2 3 жыл бұрын
Hope he doesn't lol
@abe10
@abe10 3 жыл бұрын
@@888ian2 lol
@WebDevSimplified
@WebDevSimplified 3 жыл бұрын
Looks like you bet right :P
@nijinnazar4760
@nijinnazar4760 3 жыл бұрын
It is just annoying to look at that animation, moving up and down...
@daheck81
@daheck81 3 жыл бұрын
This should be basic knowledge if you do CSS animations in general to be honest.
@realsolo5569
@realsolo5569 2 жыл бұрын
Wan!!! wowwwwww my daddd sell out ? sure wiehle avenue dunwoodyy no ride buses pursuit of happinsess #lgcay thrash me James thrash thrasers left dererpartures boarding passes international traffic turing test!!! expand zeh airport now!!!! we need it here to savannah rip zeh runway coffee county fashion week mörp /dev/null
@vertigo1196
@vertigo1196 3 жыл бұрын
Lmao I just set my cpu to 6 throttle and its lagging so much this comment will prob be posted in 5 years
@igorpi25
@igorpi25 3 жыл бұрын
Please, stop "moving text" on the half of screen when you explain code. It extremely annoying
Learn CSS Animation In 15 Minutes
15:33
Web Dev Simplified
Рет қаралды 751 М.
Why Great Developers DON'T Create Content (and a lesson to learn)
6:56
Heartwarming: Stranger Saves Puppy from Hot Car #shorts
00:22
Fabiosa Best Lifehacks
Рет қаралды 21 МЛН
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 25 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 21 МЛН
Using CSS custom properties like this is a waste
16:12
Kevin Powell
Рет қаралды 161 М.
What's new in web animations
17:26
Chrome for Developers
Рет қаралды 37 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 919 М.
Learn Intersection Observer In 15 Minutes
15:32
Web Dev Simplified
Рет қаралды 322 М.
Learn Every CSS Selector In 20 Minutes
19:38
Web Dev Simplified
Рет қаралды 440 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 691 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 461 М.
Learn CSS Transform In 15 Minutes
14:37
Web Dev Simplified
Рет қаралды 170 М.