Тёмный

Master Media Queries And Responsive CSS Web Design Like a Chameleon! 

Slaying The Dragon
Подписаться 111 тыс.
Просмотров 286 тыс.
50% 1

🚨🚨🚨 COURSES - slayingthedragon.io 🚨🚨🚨
Join the discord - / discord
You might be wondering why there’s a Chameleon in the thumbnail of this video.
A Chameleon can change it’s color and pattern - adapting it’s appearance to match it’s environment.
The chameleon's ability to quickly and seamlessly change its appearance is a skill to be admired - and what I’m suggesting is that we ought to be more like the chameleon when creating our responsive layouts.
The mobile-first pre-defined media queries:
/* xs */
/* @media (min-width: 475px) {} */
/* sm */
/* @media (min-width: 640px) {} */
/* md */
/* @media (min-width: 768px) {} */
/* lg */
/* @media (min-width: 1024px) {} */
/* xl */
/* @media (min-width: 1280px) {} */
/* 2xl */
/* @media (min-width: 1536px) {} */
The desktop-first pre-defined media queries:
/* 2xl */
@media (max-width: 1536px) {}
/* xl */
@media (max-width: 1280px) {}
/* lg */
@media (max-width: 1024px) {}
/* md */
@media (max-width: 768px) {}
/* sm */
@media (max-width: 640px) {}
/* xs */
@media (max-width: 475px) {}
Mobile container utility class:
.container {
width: 100%;
margin-left: auto;
margin-right: auto;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
/* xs */
@media (min-width: 475px) {
.container {
max-width: 475px;
}
}
/* sm */
@media (min-width: 640px) {
.container {
max-width: 640px;
}
}
/* md */
@media (min-width: 768px) {
.container {
max-width: 768px;
}
}
/* lg */
@media (min-width: 1024px) {
.container {
max-width: 1024px;
}
}
/* xl */
@media (min-width: 1280px) {
.container {
max-width: 1280px;
}
}
/* 2xl */
@media (min-width: 1536px) {
.container {
max-width: 1536px;
}
}
Desktop container utility class:
.container {
max-width: 1536px;
margin-left: auto;
margin-right: auto;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
/* 2xl */
@media (max-width: 1536px) {
.container {
max-width: 1280px;
}
}
/* xl */
@media (max-width: 1280px) {
.container {
max-width: 1024px;
}
}
/* lg */
@media (max-width: 1024px) {
.container {
max-width: 768px;
}
}
/* md */
@media (max-width: 768px) {
.container {
max-width: 640px;
}
}
/* sm */
@media (max-width: 640px) {
.container {
max-width: 475px;
}
}
/* xs */
@media (max-width: 475px) {
.container {
width: 100%;
}
}

Наука

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

 

10 апр 2023

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 312   
@slayingthedragon
@slayingthedragon 9 месяцев назад
🚨🚨🚨 New CSS Course - slayingthedragon.io 🚨🚨🚨
@Psyzenn
@Psyzenn 7 месяцев назад
:OOOOOOO I really love that idea. Can you tell me if you use both dekstop and mobile containers in one css file or you select based on which design you start first like mobile -> dekstop or dekstop->mobile ? P.S. Nevermind you just mentioned at the end + I remembered you mentioned only 6 media queries and if I used both that would be 12.
@EtimDavid-rn2o
@EtimDavid-rn2o Месяц назад
Nice job man, thanks a lot, How did your browser show the screen size, please I need to know?
@slayingthedragon
@slayingthedragon Месяц назад
@@EtimDavid-rn2o open the chrome dev tools, toggle on the device toolbar, on the top right corners there's 3 dots, click them and select show media queries
@officialmoai3107
@officialmoai3107 22 дня назад
Thanks. ❤️
@ThirdEyePsychology
@ThirdEyePsychology 5 дней назад
@@slayingthedragon thank you so much!!
@glaze4629
@glaze4629 5 месяцев назад
Not only your solution is more elegant, but way easier to understand, I did always struggle with this concept, thank you for such an informative video!!!
@beanguap
@beanguap 10 месяцев назад
One of the absolute greatest videos I’ve seen in regards to medía queries. One of the best CSS videos I’ve seen in general
@aytuncdemir4844
@aytuncdemir4844 Год назад
you explain things very understandable. it would be really great to see some bootstrap or tailwind or some js framework videos from you.
@VyrolF
@VyrolF 3 месяца назад
The way you explain and show things with examples is sooooooo goooood! Congratulations for your hard work on educating us, it’s highly appreciated!
@ufyohwo3613
@ufyohwo3613 Год назад
I'm so glad I found your channel! your videos are so engaging and to the point. Thank you so much!
@henrythomas7112
@henrythomas7112 Месяц назад
Thanks for the new video! I’m looking forward to seeing what other content you post! Always good to learn as much as you can!
@jasonjeong3737
@jasonjeong3737 2 месяца назад
just purchased your course as a refresher for CSS. excited!
@rhapsodygrab
@rhapsodygrab Год назад
You are really always slaying the dragon....keep it up, man
@DannyH77
@DannyH77 10 месяцев назад
I'm glad i found this channel. keep up the great work!!
@boy_deploy
@boy_deploy 10 месяцев назад
Pure CSS and HTML. I LOVE THIS!
@ankitpoudel3255
@ankitpoudel3255 Год назад
Damn! Incredible content. Definitely, changing the width of 90% in the project I am currently working on!
@bucketassrabbit1993
@bucketassrabbit1993 Год назад
your videos are amazing! thank you for making such high quality content!
@imyou3627
@imyou3627 Год назад
man you are awesome please make content often.... we can learn a lot and sure... your going to make it a million subs.
@astralunification1681
@astralunification1681 6 дней назад
The best on CSS I have seen so far, I also bought the course 3 months ago, help me a lot with my websites, waiting to purchase the other courses when released, thanks bro
@JasonColdham
@JasonColdham 8 дней назад
Those break points have helped me so much! Thank you for another great video!
@Darius-Paul
@Darius-Paul 10 месяцев назад
finally someone who knows how to explain , without using fancy language. - all others "beginner" tutorials just gave me a headache. Hats down to you.
@Nob47
@Nob47 11 месяцев назад
i love you bro i was searching for a tutorial which is to the point and i struck gold on this one
@HenryL1606
@HenryL1606 7 месяцев назад
I just learned how to use media queries thanks to you!!! THANK YOU!😁
@user-mf5kx4kn8l
@user-mf5kx4kn8l 10 месяцев назад
Your explanation is great in a very short time. Best on RU-vid.
@mackenmd
@mackenmd Год назад
Your presentation skills are second to none! Thank you very much for your very professional work.
@matthewnjoroge4759
@matthewnjoroge4759 Год назад
How do i get my browser to show me pixel dimensions?
@casperdrums
@casperdrums 8 месяцев назад
@@matthewnjoroge4759 see my comment
@thebestof_angel8010
@thebestof_angel8010 9 месяцев назад
This is exactly what I was looking for, life saver thanks man
@moriartythenavigator1945
@moriartythenavigator1945 Месяц назад
Wow, what a great teacher - I learned what I wanted to know in minutes...I'm going to watch the rest of the tutorial and see what else I can learn. Thanks a lot!
@caioresque
@caioresque 6 месяцев назад
Oh my god, this video that was i need to see. Thank you from Brazil, bro
@itsnariah
@itsnariah Месяц назад
Found you!!! I've been looking everywhere on how to arrange the elements if I have to view them in mobile and this video helps me so much! Thanks!
@charlesngerem3198
@charlesngerem3198 Год назад
Keep pushing out these contents and you're heading for 1M subs
@sayanghosh6996
@sayanghosh6996 Год назад
Love your videos! keep them coming.
@user-by6bi8wj3h
@user-by6bi8wj3h 11 месяцев назад
Informative, helpful and aesthetic 5/5 tutorial. Earned me as a subscriber.
@sojimotive7166
@sojimotive7166 Год назад
Fantastic video! could you make a video too how to use using %, px, em, vh and where to use it on perspective div, parent/children?
@relja_
@relja_ Год назад
this is also confusing to me, i cant find a video that explains it well, all they do is explain what are these units and categories them but not when to use which one.
@withacc
@withacc Год назад
He talked a little about these measurement units in another video titled 'CSS Units: A Deep Dive'
@relja_
@relja_ Год назад
@@withacc yea i watched that video its good but if i remember correctly he only covered the theory part of units but not how there are used in a real project. Not only him i never found any video that covers that part.
@ShaDoW_T0.
@ShaDoW_T0. Месяц назад
i loved your videos bro it was short and simple and most of all it was really helpful
@zafit02
@zafit02 Год назад
You are the best keep this way you will have millions of views so easy to learn with you
@UwaisLatona
@UwaisLatona 4 месяца назад
oh my god thank you so much for this, other videos were just complicating things so much
@ragenk1062
@ragenk1062 Год назад
Thanks for sharing your knowledge! Looking forward to your next video :P
@AbhinandanMishra1
@AbhinandanMishra1 Год назад
You're awesome 🎉 Please make more videos and teach the hard parts of CSS.
@Sami_K99
@Sami_K99 Год назад
Welcome back 🎉 great video
@ijadjukaj7539
@ijadjukaj7539 9 месяцев назад
Very nice video as usually, explaining with practical work is very effective... your videos are the most understandable front-end tutorials on youtube in my opinion... I wonder if you do some videos about javascript concepts you would help us because are a little confusing.
@theMadZakuPilot
@theMadZakuPilot 15 дней назад
this is perfection.
@TerryLoughran
@TerryLoughran 26 дней назад
Very cool and so adaptable for all builds. Mobile first all the way 😊 Thanks 👍
@Kronical_Lpd
@Kronical_Lpd Год назад
I've never seen this many chameleons within the first 20 seconds of a video All jokes aside tho, amazing video like always.
@MONGMONG-ep3eb
@MONGMONG-ep3eb Месяц назад
thank youuuuuuu I've been struggling with my lesson lately and now i understand it
@iamsunil21
@iamsunil21 Год назад
your voice is like daily dose of internet.
@deepjoshi356
@deepjoshi356 Год назад
There are many solution to a single problem. You have the clarity to choose the best fit. What are the problems are you facing?
@shiba_baig1631
@shiba_baig1631 4 месяца назад
impressed by your videos extremely smooth and deep explanation...... keep it up!
@OmniOmnium
@OmniOmnium Год назад
Great video as usual! :) I was wondering if you would be interested in creating a video about those "pop in" animations when scrolling down while the elements get visible. That'd be dope, feels like every portfolio piece has them.
@slayingthedragon
@slayingthedragon Год назад
Sure great suggestion thanks ☺️❤️
@roronoazoro3163
@roronoazoro3163 10 месяцев назад
​@@slayingthedragoncan you please tell me which website are you using to shrink those size of websites without shrinking the actual chrome page
@tuffilaro1565
@tuffilaro1565 8 месяцев назад
@@roronoazoro3163 it's a feature of the chrome dev tools. Google: "chrome devtools device mode" to find how to do it. Fyi Firefox also has that feature and it works better there in my opinion because you can also zoom in and out in it by just using ctrl + mouse wheel.
@simba---
@simba--- 7 месяцев назад
@@roronoazoro3163 Its not a website but dev tools in your browser. Right click, inspect and click on mobile icon on the top. I assume you already found an answer but in case you did not I hope this will help.
@Xooou_
@Xooou_ Год назад
Waiting for this!❤❤
@Bol_imla
@Bol_imla 7 месяцев назад
great illustration.Keep it up for the wonderful tutorial
@SUPA93200
@SUPA93200 Год назад
Wow, excellent, thanks again for sharing your knowledge.
@brianm3160
@brianm3160 Год назад
You're back!
@yosefff19
@yosefff19 10 месяцев назад
You really make coding looks so easy and fun! definitely worth watching every videos of yours! so educational and good for beginners :)) I hope you upload more content
@leomacdon7858
@leomacdon7858 Год назад
Thank you. Your contents are really helpful.
@FajarFadhillah-vt4dh
@FajarFadhillah-vt4dh 9 месяцев назад
This is good and effective, explain something with good visual, i like it
@KelvinEreremena
@KelvinEreremena Месяц назад
I love this man. Thank you!!!!
@brandophiri3618
@brandophiri3618 7 месяцев назад
This guy is actually good
@michaelchukwu7480
@michaelchukwu7480 Год назад
God! The Way you explain things....... It just so mind blowing. You have a gift bro, I would seriouly want to learn or have a teacher with even half of your teaching skills. You just got yourself a faithful Subscriber. Keep it up bro!!!1
@slayingthedragon
@slayingthedragon Год назад
Thank you much love ❤️
@chrismachabee3128
@chrismachabee3128 2 месяца назад
I have been trying to understand the mobile design first concept for a while. How the heck do you do that? Yu have just shown me the way. Total brilliant. I go to a lot of instructors to get sorted, without success on this problem, but you were the best teaching the method. The only that took time to explain the difference between Max and MIn and how it relates t mobile first responsive desive. Well done. Now. if you just get the Javascript course done.
@khumanshusingh
@khumanshusingh Год назад
amazing work bro really learned everything clearly💯💯
@mohammadabbas1623
@mohammadabbas1623 Год назад
you are doing great bro keep going
@j.caceres8069
@j.caceres8069 Год назад
Que buen video amigo!!! M gustan tus videos y como los explicas.
@DojoDyo
@DojoDyo 5 месяцев назад
another awesome guide STD!! please make more !! HTML and CSS!!
@charlesbrill1531
@charlesbrill1531 3 месяца назад
thank you deeply from my soul for this video
@lastspoil5547
@lastspoil5547 4 месяца назад
Best video on media query
@soum-ik
@soum-ik Год назад
Your video concept is awesome. It very helps full for m. Take love from Bangladesh💖💖, Love you brother. Create this type of video regularly
@rSethu98
@rSethu98 4 месяца назад
Very nice approach
@tusharyadav5874
@tusharyadav5874 Год назад
Thanks for the video ❤
@sanselm529
@sanselm529 10 месяцев назад
thank you. very good explained
@fernandosiahaan906
@fernandosiahaan906 11 месяцев назад
You are a CSS magician
@Zubair73735
@Zubair73735 8 месяцев назад
thanks a lot! It helps me a lot
@andrewii23
@andrewii23 Год назад
I love the intro 😂
@bobevskiboban
@bobevskiboban 7 месяцев назад
Salute to you sir, helped a ton
@benjicanones1454
@benjicanones1454 Год назад
Superv explanation!
@Evolveado
@Evolveado 27 дней назад
just AMAZING.
@UndeadSasuke34
@UndeadSasuke34 Год назад
Exceptional video! Could you please make an in depth video about margins, paddings and borders, and in that video also go in depth about nitty gritty stuff like the consequence you've talked about at 8:10? There are many videos about this out there, but none go in depth about the relations and consequences of these properties.
@slayingthedragon
@slayingthedragon Год назад
Good suggestion ❤️
@nitkarshchourasia2406
@nitkarshchourasia2406 4 месяца назад
🎯 Key Takeaways for quick navigation: 00:00 🦎 *Understanding the Concept of Media Queries* - Media queries allow targeting specific viewport sizes for applying styles. - Syntax involves specifying media type and conditions within parentheses. - Differentiating between `max-width` and `min-width` is crucial for effective usage. 02:58 🖥️ *Implementing Responsive Design Strategies* - Choose between `max-width` for desktop-first design and `min-width` for mobile-first design. - Apply media queries to adjust styles for various breakpoints to maintain responsiveness. - Select elements within media queries and modify their styles accordingly. 04:53 📱 *Pitfalls of Reactive Media Query Application* - Reactive application of media queries leads to a proliferation of breakpoints. - A large number of breakpoints can complicate maintenance and scalability. - Implementing predefined media queries for components enhances efficiency and reduces complexity. 06:01 🌐 *Leveraging Predefined Media Queries for Efficiency* - Utilize predefined media queries for specific viewport sizes to streamline responsive design. - Define media queries for various screen sizes: extra small, small, medium, large, extra-large, and extra-extra-large. - Employing predefined media queries reduces the need for reactive breakpoint additions and simplifies layout maintenance. 07:25 📐 *Optimizing Container Responsiveness* - Introduce container utility classes to ensure consistent alignment and responsiveness across sections. - Set up containers to shrink responsively only when the viewport touches, enhancing visual coherence. - Compare and contrast different container implementation methods for mobile-first and desktop-first design approaches. Made with HARPA AI
@fragmiddlet
@fragmiddlet Год назад
Thanks !! :) amazing video :)
@DJReeRee
@DJReeRee Год назад
Love this❤
@thelegaldrive
@thelegaldrive 8 месяцев назад
very useful video, thank you.
@user-xj6fp8mc1o
@user-xj6fp8mc1o 11 месяцев назад
A Damn good video... this is a damn good video
@samueldayo9261
@samueldayo9261 6 месяцев назад
I love your teaching your good. Other mentors just type the code you can't even know how. It functions
@M7D_aska
@M7D_aska 10 месяцев назад
Could you make a video talking about the differences between normal CSS and tailwind , as well as how much of a difference using JavaScript can make
@NewbieDev42-it8tg
@NewbieDev42-it8tg Год назад
Great video
@japoetrycollection5201
@japoetrycollection5201 Год назад
I subscribe your channel right now I love the way that's you teaching Please make separate playlists of all HTML5 CSS3 and JAVASCRIPT and it's frame works and it's different small projects
@shaunm9025
@shaunm9025 Год назад
you make great videos bro
@snakeeyesOFFICIAL76
@snakeeyesOFFICIAL76 Год назад
Best video about media queries my friend ...you should upload more content
@slayingthedragon
@slayingthedragon Год назад
Thank you !!
@shauryasoni748
@shauryasoni748 Год назад
Bro please make a full css course with all animations and all please
@maxxphire.
@maxxphire. 4 месяца назад
This guy is good explaining css properties. Now my prob' is how i am going to use it properly. I have to understand how css relative measurements works. Specially the pixels and viewports. They're quite confusing.
@kenxinhxc1635
@kenxinhxc1635 Год назад
Thanks for this
@rupiik
@rupiik Год назад
Wow!!!
@728sahilpanchbhaiya5
@728sahilpanchbhaiya5 11 месяцев назад
Earned a subscriber today...❤❤❤
@Shivam-sl4sp
@Shivam-sl4sp 3 месяца назад
Great explanation as always! btw do you use any extension when you apply media query your dev tools use colors to specify it?
@slayingthedragon
@slayingthedragon 3 месяца назад
Thanks! No I'm not using any extensions, it's all features you can activate on Chrome's dev tools
@ogawde7
@ogawde7 11 месяцев назад
blessing thats all i can say
@justinmathew8929
@justinmathew8929 Год назад
Waiting for more videos ☺️☺️
@zexinzhao5423
@zexinzhao5423 Год назад
nice video, thks for sharing ! 😘
@rohitkumar-eu1hs
@rohitkumar-eu1hs 5 дней назад
Easy to understand
@ThiagoSilva-jn6ov
@ThiagoSilva-jn6ov 3 месяца назад
good thing my g
@brandonlizardo7662
@brandonlizardo7662 5 месяцев назад
thank you so much
@mdtausifahmed6205
@mdtausifahmed6205 8 месяцев назад
coool man
@aurorapaisley7453
@aurorapaisley7453 8 месяцев назад
YOU'RE SO BASED
@JosephCodette
@JosephCodette Год назад
You could use clamp for responsive sizing .. saves a lot of lines of code
@izuchukwupromise4071
@izuchukwupromise4071 6 месяцев назад
How does clamp work?
@deatho0ne587
@deatho0ne587 7 месяцев назад
Display grid or flex with a bit of clamp() will cover most things you are talked about. I am not saying the media query is completely out of the picture though. You then have @container queries which are way better than @media, but not 100% supported till about September of this year. Yes, stuff like bootstrap and tailwind have to go with @media since they have to be for almost any site out there. They generally are not custom sites though.
@marselse
@marselse 10 месяцев назад
you are him.. ty for this
Далее
A practical guide to responsive web design
23:13
Просмотров 162 тыс.
NAME THE EURO 2024 PLAYER OR SWIM 💦
00:35
Просмотров 11 млн
Akamakasi dedimi nima dedi🤔
00:25
Просмотров 2,7 млн
Reverse Engineer CSS Animations #Shorts
0:39
Просмотров 871 тыс.
Responsive Flexbox Layout in 2 Minutes
2:41
Просмотров 19 тыс.
5 simple tips to making responsive layouts the easy way
15:54
Learn CSS Grid - A 13 Minute Deep Dive
13:35
Просмотров 476 тыс.
Main filter..
0:15
Просмотров 10 млн
Телефон в воде 🤯
0:28
Просмотров 1,2 млн
Купил этот ваш VR.
37:21
Просмотров 292 тыс.
iOS 18 vs Samsung, Xiaomi,Tecno, Android
0:54
Просмотров 78 тыс.