Тёмный

Finally understanding Flexbox flex-grow, flex-shrink and flex-basis! - Tutorial 11 of 20 💪 

Wes Bos
Подписаться 182 тыс.
Просмотров 85 тыс.
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 83   
@i-heart-google7132
@i-heart-google7132 4 года назад
Bro, you're better than the official documentation and all those lame tutorials combined! Great work!
@Powerful-Manifestor-
@Powerful-Manifestor- 2 года назад
Watching all other videos, I wondered why the width of one is not in proportion to the other. You made it so clear that the extra room is divided in that proportion. Awesome! Two questions: 1. What is flex-basis when flex:1 is used? 2. What is the difference between using width vs flex-basis on a flex item?
@arifulislamadil4295
@arifulislamadil4295 3 года назад
i have watched lots of youtube videos about flex-grow and shrink., i really didn't understand them properly after i watched this it's gave the clear concept about flex-grow and flex-shrink.Thank you very much Wes Bos
@nellypolly6639
@nellypolly6639 Год назад
this video gave me more understanding of flex shorthand. Thank you
@pilloIMNG
@pilloIMNG Год назад
Great explanation! I now understand more about these properties, thank you! I gotta note that the intro is very loud and your voice is very low, but this video is 7 y o so might have changed.
@dudakoff1000
@dudakoff1000 Год назад
You are a gem. The CSS tricks article dedicated to this topic failed me this time
@jarrychen2096
@jarrychen2096 2 года назад
I spent a lot of time reading the documentation, but eventually understood it in your ten minutes video! So incredible.
@shivarammuthukumaraswamy7164
@shivarammuthukumaraswamy7164 3 года назад
Thank You so much for the clear explanation
@WILLGYS
@WILLGYS 3 года назад
Man is for box, not the container! that's why it wasn't doing anything. Thanks Wes
@suyashpurwar8310
@suyashpurwar8310 3 года назад
This video was really helpful! Helped a lot! I was very confused when it comes to these three properties. Thanks a lot!!
@matthewbell5282
@matthewbell5282 4 года назад
Really, really well explained - thank you!
@suridchakma4403
@suridchakma4403 3 года назад
Your style of describing is super 🔥
@mentalidade-hacker
@mentalidade-hacker 2 года назад
way better explanation than codecademy
@abstractdavis
@abstractdavis 4 года назад
Thanks a lot, very clear explanation
@boiiiiiiiiiiiiiiii2612
@boiiiiiiiiiiiiiiii2612 Год назад
thank you for the explanation.
@HarpreetSingh-vf6lu
@HarpreetSingh-vf6lu 7 лет назад
Can you explain the math of why we use 1? What calculations are done for use to know which number to use and what it does for flex grow? Thank you.
@codeme8016
@codeme8016 Год назад
Good tutorial. You can also enable the browser's responsive "toggle device toolbar" tool e.g. Chrome to resize the frame instead of resizing your entire browser window.
@Stone_624
@Stone_624 4 года назад
This is a beautiful explanation, Thank you!
@montecristo7963
@montecristo7963 2 года назад
Thank you that was really helpful
@ankurc
@ankurc 4 года назад
Thank you. You made it very clear!
@ycombinator765
@ycombinator765 2 года назад
Wes is the Boss
@codesiddhi
@codesiddhi Год назад
👍well explained, thanks :)
@austinethridge2771
@austinethridge2771 5 лет назад
Thank you sir! I understand it now
@ek4m81
@ek4m81 5 лет назад
that's good
@ahmedam77
@ahmedam77 Год назад
great video!
@ted2091
@ted2091 2 года назад
explained it perfectly, thank you
@armandoperez9528
@armandoperez9528 7 лет назад
Oh my god, this intro is soooo annoying. It is still a great tutorial.
@SuperKojota
@SuperKojota 6 лет назад
Stupid whisper.
@leakyabstraction
@leakyabstraction 3 года назад
Pretty sure all the downvotes are the result of that intro. I was so annoyed... Started to wonder if there is something seriously wrong with me to find it that annoying; but then I saw your comment.
@spencerwasden5155
@spencerwasden5155 3 года назад
@@SuperKojota did you mean "whistle"? If so I agree--it actually hurt my ears. But great tutorial!! Thanks @Wes Bos
@lddonovan
@lddonovan 8 лет назад
Great tutorial!
@jaredsimon3731
@jaredsimon3731 2 года назад
Thank you sir. This was great.
@ronishlopchan2020
@ronishlopchan2020 2 года назад
great content!
@uimonk
@uimonk 3 года назад
you are awesome..
@jasserlabiadh7012
@jasserlabiadh7012 2 года назад
bro thaaank youuuuuuuuuuuuu ily
@friend1310
@friend1310 8 лет назад
Hi Wes, can you please use fractions to express how much an element is giving away of its width when using flex-shrink? I think I don’t get it. You use flex-basis:400px for both .box1 and .box2. So, when the container is 800px wide, each box is 400px wide. Then you use flex-grow:10 for .box1 and flex-grow:1 for .box2. So, when the container gets wider than 800px the extra room will get split between the elements using the ratio we set for flex-grow. My understanding is that .box1 gets 10/11 of free space and .box2 gets 1/11. So yes, .box1 gets 10x more extra space than .box2. But how does this work with flex-shrink? We used the same values for flex-shrink as for flex-grow, but obviously .box1 is not giving away 10/11 of its width when the container gets below 800px. Thanks!
@friend1310
@friend1310 8 лет назад
I think I got it, but I am not sure if I'm right. I think that if the container gets for example 700px wide the .box1 and 2 miss 100px, they just can't be 400px each any more. So, they have to split the 100px using the ratio above, meaning .box1 will be narrower by 100*10/11~90.91px and .box2 will be narrower by 100*1/11~9.09. The new width of .box1 will be 400-90.91=309.09px and the width of .box2 will be 400-9.09=390.91px. Now .box1 and .box2 (309.09+390.91=700) exactly fit 700px wide container. Can somebody confirm my theory? :D
@friend1310
@friend1310 8 лет назад
Yes, that's how it works. I just checked it using web inspector.
@HarpreetSingh-vf6lu
@HarpreetSingh-vf6lu 7 лет назад
Hey, can you explain the math behind this please of how flex-grow works, hard to find online.
@MikeMike-ms1ns
@MikeMike-ms1ns 3 года назад
why is there bullshit like if you are in the 10th level div you can't set it to use the remaining space but need to put display flex on every level of div above it? Shouldn't immediate div be enough?
@graceji4082
@graceji4082 7 лет назад
awesome tutorial!
@majdalkwaja9792
@majdalkwaja9792 5 лет назад
Thanks bro
@dijanad6021
@dijanad6021 4 года назад
good explanation!
@juniorusca602
@juniorusca602 3 года назад
I love this explication
@henriquemagno9326
@henriquemagno9326 Год назад
thanks
@tabniletley2643
@tabniletley2643 4 года назад
i actually really like the intro. it's so 90's!
@williamjamesrapp7356
@williamjamesrapp7356 4 года назад
Looks good You do a fair job of teaching this BUT what happens when I type in What you type in and IT STILL DOES NOTHING ?
@shotbylowie
@shotbylowie 4 года назад
check if you linked your css correctly in your
@nasko717
@nasko717 7 лет назад
Thanks!
@cashpay50
@cashpay50 3 года назад
subscibed!
@nailalzuhairi2690
@nailalzuhairi2690 5 лет назад
u r brilliant
@chome4
@chome4 6 лет назад
How do you apply 'wrapping' to force the second box onto the second row?
@dvidalv
@dvidalv 3 года назад
excelent!
@barrbudo
@barrbudo 8 лет назад
What's the extension you are using for informing the screen dimensions? The ones I've found so far do not work if I'm working with a local file :(
@toddjudd9552
@toddjudd9552 8 лет назад
+Barbudo view port dimensions available in the chrome store here: chrome.google.com/webstore/detail/viewport-dimensions/kchdfagjljmhgapoonapmfngpadcjkhk/related?hl=en-US
@barrbudo
@barrbudo 8 лет назад
Todd Judd Thanks :)
@EquinoXReZ
@EquinoXReZ 3 года назад
Fire
@l3tk1ll
@l3tk1ll 7 лет назад
ty
@BohemianOnTheRoad
@BohemianOnTheRoad 9 месяцев назад
omg its 8 year ago
@afaque.
@afaque. 4 года назад
what if he started again making these intros in his new videos...that will be
@igu642
@igu642 Год назад
❤❤
@napolunatico
@napolunatico 7 лет назад
I think this is not completele well explained. Why? Because when you give flex-grow or flex-shrink to an element you do not make 'x' times bigger than the other one, you are just using 'THE AVAILABLE SPACE', and dividing it in many spaces as you have given to the summary of all the elements, and from this point the browser gives the size to every element according with the number of flex-grow o shrink that you gave to it every single element. (My english is not good enought sorry). Bless!
@Oguztogrul
@Oguztogrul 2 года назад
You explain very bad. Sorry.
@NanarStudios
@NanarStudios 2 года назад
Helpful, but you have to watch in 1.5x speed for it to almost feel like a normal speaking speed
@prajwalpandeshwar9967
@prajwalpandeshwar9967 9 месяцев назад
Thankyou so much for such an easy explanation!!
@ajcics
@ajcics 7 лет назад
You're an incredible teacher. Thank you
@Dorff_Meister
@Dorff_Meister 3 месяца назад
Very helpful. Thanks.
@rafayzia4180
@rafayzia4180 2 года назад
love your gentle voice bro ! thank you :)
@neozhang8700
@neozhang8700 4 года назад
excellent explanation~~
@steelo2214
@steelo2214 2 года назад
yah that’s it. subscribed!
@haley8004
@haley8004 3 года назад
Someone know what this means? I have no idea. "kind of look at your layout and intelligently figure out how big these other ones should be"
@debi199
@debi199 2 года назад
thanks for all the efort and love
@amirhossein7984
@amirhossein7984 4 года назад
Just play at 1.25x speed.
@StrangeIndeed
@StrangeIndeed 3 года назад
I had to refresh my memory about flexbox, and this video was great for that, thank you c;
@fondungallahkondem2923
@fondungallahkondem2923 3 года назад
thank you so much
@LongNguyen-op7ls
@LongNguyen-op7ls 4 года назад
Very good tutorial man ! These flex things was annoying me for hours
@Undrios
@Undrios Год назад
thank you!
@Rivederchee
@Rivederchee 2 года назад
this left earrape
@amr19932012
@amr19932012 2 года назад
Simple and informative, Thank you !
@Johann.Liebert
@Johann.Liebert 2 года назад
thanks :D
@Free--Soul
@Free--Soul 3 года назад
great job
@blueapple9135
@blueapple9135 3 года назад
Thanks for well explained.
Далее
Flex grow, shrink, basis | CSS Flexbox tutorial
8:42
С какого года вы со мной?
00:13
Просмотров 100 тыс.
Самая сложная маска…
00:32
Просмотров 962 тыс.
Why did OpenAI move from Next.js to Remix?
10:41
Просмотров 136 тыс.
LINQ's INSANE Improvements in .NET 9
11:26
Просмотров 46 тыс.
Flexbox design patterns you can use in your projects
15:33
Vim Tips I Wish I Knew Earlier
23:00
Просмотров 67 тыс.
6 Advanced Flexbox Features You Probably Don’t Know
14:54
Learn Flexbox CSS in 8 minutes
8:16
Просмотров 1,6 млн
15 Years Writing C++ - Advice for new programmers
4:04