SlideShare a Scribd company logo
Flexbox - верстка без float'ов by Dmitry Radyno
• 
•
- 
- 
-
- 
-
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
.container { 
display: flex; 
} 
<div class="container"> 
<div class="item">...</div> 
<div class="item">...</div> 
</div>
.container { 
flex-direction: row; /* row-reverse | column | column-reverse */ 
}
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
<div class="container"> 
.container { 
display: flex; 
justify-content: center; 
align-items: center; 
} 
<div class="item"> 
I'm align center<br> 
It's not a miracle! 
</div> 
</div>
Flexbox - верстка без float'ов by Dmitry Radyno
.item { 
flex-basis: 200px; 
flex-grow: 1; 
flex-shrink: 1; 
} 
.item { 
flex: 1 1 200px; 
}
<div class="container"> 
<div class="item small">I'm 200px by default</div> 
<div class="item big">I'm 400px by default</div> 
<div class="item small">I'm 200px by default</div> 
</div> 
.container { 
display: flex; 
width: 1000px; 
} 
.item.small { 
flex: 1 1 200px; 
} 
.item.big { 
flex: 1 1 400px; 
}
<div class="container"> 
<div class="item small">I'm 200px by default</div> 
<div class="item big">I'm 400px by default</div> 
<div class="item small">I'm 200px by default</div> 
</div> 
.container { 
display: flex; 
width: 1000px; 
} 
.item.small { 
flex: 1 1 200px; 
} 
.item.big { 
flex: 3 1 400px; 
}
<div class="container"> 
<div class="item small">I'm 200px by default</div> 
<div class="item big">I'm 400px by default</div> 
<div class="item small">I'm 200px by default</div> 
</div> 
.container { 
display: flex; 
width: 700px; 
} 
.item.small { 
flex: 1 1 200px; 
} 
.item.big { 
flex: 1 1 400px; 
}
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
.container { 
flex-direction: row; 
flex-wrap: wrap; 
} 
. container { 
flex-flow: row wrap; 
} 
.container { 
flex-direction: column; 
flex-wrap: nowrap; 
} 
. container { 
flex-flow: column nowrap; 
}
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
<div class="container"> 
<div class="item first">I'm the first</div> 
<div class="item second">I'm the second</div> 
<div class="item third">I'm the third</div> 
</div> 
.item.first { 
order: 2; 
} 
.item.second { 
order: 3; 
} 
.item.third { 
order: 1; 
}
.container { 
display: flex; 
flex-flow: row wrap; 
justify-content: center; 
align-items: center; 
align-content: stretch; 
} 
.item { 
flex: 1 1 auto; 
order: 2; 
}
HTTP://CODEPEN.IO/RADYNO/PEN/FRXTA 
HTTP://CODEPEN.IO/RADYNO/PEN/AWGLP
Flexbox - верстка без float'ов by Dmitry Radyno
.container { 
display: -webkit-flexbox; 
display: -ms-flexbox; 
display: flex; 
-webkit-flex-flow: column nowrap; 
-ms-flex-flow: column nowrap; 
flex-flow: column nowrap; 
justify-content: flex-end; 
-ms-flex-pack: end; 
flex-pack: end; 
-ms-flex-line-pack: distribute; 
flex-line-pack: distribute; 
align-content: space-around; 
} 
.item { 
-webkit-flex: 1 1 100px; 
-ms-flex: 1 1 100px; 
flex: 1 1 100px; 
-ms-flex-order: -1; 
flex-order: -1; 
order: -1; 
}
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
Flexbox - верстка без float'ов by Dmitry Radyno
HTTP://HTML5.BY/BLOG/FLEXBOX/ 
HTTP://CSS-TRICKS.COM/SNIPPETS/CSS/A-GUIDE-TO-FLEXBOX/ 
HTTP://CSS-TRICKS.COM/USING-FLEXBOX/ 
HTTP://CANIUSE.COM/#FEAT=FLEXBOX 
HTTPS://GITHUB.COM/POSTCSS/AUTOPREFIXER 
HTTP://WWW.W3.ORG/TR/CSS3-FLEXBOX/
Flexbox - верстка без float'ов by Dmitry Radyno

More Related Content

PDF
J querypractice
PPT
Intro to jQuery
PPTX
Jquery Basics
PPTX
2.java script dom
PDF
Introducing jQuery
PPT
Introduction to j query
PPT
J Query Public
PPTX
How to increase Performance of Web Application using JQuery
J querypractice
Intro to jQuery
Jquery Basics
2.java script dom
Introducing jQuery
Introduction to j query
J Query Public
How to increase Performance of Web Application using JQuery

What's hot (20)

PPT
J Query(04 12 2008) Foiaz
PDF
Java Script and HTML.
PDF
Javascript and DOM
PDF
Devoxx 2014-webComponents
PPTX
Javascipt
PPTX
Introduction to j_query
PPTX
Introduction to React and MobX
PPTX
JQuery
PPT
Don't Worry jQuery is very Easy:Learning Tips For jQuery
PPTX
jQuery Best Practice
PPTX
JavaScript and jQuery Basics
PPTX
PPTX
jQuery basics for Beginners
PPTX
Jqueryppt (1)
PPTX
Emmet(zen coding)
PPTX
Java script
PPTX
Knockout.js
PPTX
J Query(04 12 2008) Foiaz
Java Script and HTML.
Javascript and DOM
Devoxx 2014-webComponents
Javascipt
Introduction to j_query
Introduction to React and MobX
JQuery
Don't Worry jQuery is very Easy:Learning Tips For jQuery
jQuery Best Practice
JavaScript and jQuery Basics
jQuery basics for Beginners
Jqueryppt (1)
Emmet(zen coding)
Java script
Knockout.js
Ad

Viewers also liked (20)

PDF
Современный фронтенд за 30 минут.
PDF
Современный фронтенд -- как не утонуть в море хайпа?
PPTX
современный подход к Html верстке
PPTX
Работа с документами в JavaScript
PPTX
PDF
"Flexbox — гибче мыслишь, больше спишь", Алексей Чернышев, MoscowJS 24
PPTX
Documents in JavaScript
PDF
21 термин из HTML-верстки
PPTX
Cобытия в JavaScript
PDF
Production Ready Javascript With Grunt
PPT
Архитектурные проблемы Flex-приложений
PDF
Using Templates to Achieve Awesomer Architecture
PDF
2015-11-07 01 Виталий Кравцов. Webpack: человеческий подход к разработке веб ...
PPTX
DotNet MVC and webpack + Babel + react
PPTX
Nimesh modernist paper
PPTX
Do You Really Understand the Blog Animal And How He Can Help You?
PDF
Veterinary dictionary _21st_edition
PPTX
Anti-Spammers Need To Develop Better Manners
PPT
Come On Lets Go Fundraising PowerPoint
PPTX
FOUR_SQUARES(1).pptx
Современный фронтенд за 30 минут.
Современный фронтенд -- как не утонуть в море хайпа?
современный подход к Html верстке
Работа с документами в JavaScript
"Flexbox — гибче мыслишь, больше спишь", Алексей Чернышев, MoscowJS 24
Documents in JavaScript
21 термин из HTML-верстки
Cобытия в JavaScript
Production Ready Javascript With Grunt
Архитектурные проблемы Flex-приложений
Using Templates to Achieve Awesomer Architecture
2015-11-07 01 Виталий Кравцов. Webpack: человеческий подход к разработке веб ...
DotNet MVC and webpack + Babel + react
Nimesh modernist paper
Do You Really Understand the Blog Animal And How He Can Help You?
Veterinary dictionary _21st_edition
Anti-Spammers Need To Develop Better Manners
Come On Lets Go Fundraising PowerPoint
FOUR_SQUARES(1).pptx
Ad

Similar to Flexbox - верстка без float'ов by Dmitry Radyno (20)

PPTX
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
PDF
Flexboxsheet
PPTX
flexbox report
PDF
Leveling Up With Flexbox (Smart Web Conference)
PPTX
Flexbox every developers dream
PDF
Introduction to CSS Grid
PDF
World of Flexbox
PDF
Leveling Up with Flexbox (Smashing Conference)
PDF
Grid and Flexbox - Smashing Conf SF
PPTX
digital swifton
PDF
3- Learn Flexbox & CSS Grid / Container & items
PDF
Render Conf: Start using CSS Grid Layout Today
PDF
Laying out the future
PDF
DevFest Nantes - Start Using CSS Grid Layout today
PDF
Putting Flexbox into Practice (Fronteers)
PDF
CSS Conf Budapest - New CSS Layout
PPTX
Flexbox
PDF
Introduction to CSS Grid
PDF
Confoo: The New CSS Layout
PDF
What The Flexbox? An Intro to Flexbox
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
Flexboxsheet
flexbox report
Leveling Up With Flexbox (Smart Web Conference)
Flexbox every developers dream
Introduction to CSS Grid
World of Flexbox
Leveling Up with Flexbox (Smashing Conference)
Grid and Flexbox - Smashing Conf SF
digital swifton
3- Learn Flexbox & CSS Grid / Container & items
Render Conf: Start using CSS Grid Layout Today
Laying out the future
DevFest Nantes - Start Using CSS Grid Layout today
Putting Flexbox into Practice (Fronteers)
CSS Conf Budapest - New CSS Layout
Flexbox
Introduction to CSS Grid
Confoo: The New CSS Layout
What The Flexbox? An Intro to Flexbox

Recently uploaded (20)

PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
Sustainable Sites - Green Building Construction
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
UNIT 4 Total Quality Management .pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
Construction Project Organization Group 2.pptx
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Well-logging-methods_new................
PDF
737-MAX_SRG.pdf student reference guides
DOCX
573137875-Attendance-Management-System-original
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
Sustainable Sites - Green Building Construction
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
UNIT 4 Total Quality Management .pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Internet of Things (IOT) - A guide to understanding
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Embodied AI: Ushering in the Next Era of Intelligent Systems
R24 SURVEYING LAB MANUAL for civil enggi
Construction Project Organization Group 2.pptx
III.4.1.2_The_Space_Environment.p pdffdf
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Safety Seminar civil to be ensured for safe working.
CYBER-CRIMES AND SECURITY A guide to understanding
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Well-logging-methods_new................
737-MAX_SRG.pdf student reference guides
573137875-Attendance-Management-System-original

Flexbox - верстка без float'ов by Dmitry Radyno

  • 4. - -
  • 7. .container { display: flex; } <div class="container"> <div class="item">...</div> <div class="item">...</div> </div>
  • 8. .container { flex-direction: row; /* row-reverse | column | column-reverse */ }
  • 13. <div class="container"> .container { display: flex; justify-content: center; align-items: center; } <div class="item"> I'm align center<br> It's not a miracle! </div> </div>
  • 15. .item { flex-basis: 200px; flex-grow: 1; flex-shrink: 1; } .item { flex: 1 1 200px; }
  • 16. <div class="container"> <div class="item small">I'm 200px by default</div> <div class="item big">I'm 400px by default</div> <div class="item small">I'm 200px by default</div> </div> .container { display: flex; width: 1000px; } .item.small { flex: 1 1 200px; } .item.big { flex: 1 1 400px; }
  • 17. <div class="container"> <div class="item small">I'm 200px by default</div> <div class="item big">I'm 400px by default</div> <div class="item small">I'm 200px by default</div> </div> .container { display: flex; width: 1000px; } .item.small { flex: 1 1 200px; } .item.big { flex: 3 1 400px; }
  • 18. <div class="container"> <div class="item small">I'm 200px by default</div> <div class="item big">I'm 400px by default</div> <div class="item small">I'm 200px by default</div> </div> .container { display: flex; width: 700px; } .item.small { flex: 1 1 200px; } .item.big { flex: 1 1 400px; }
  • 24. .container { flex-direction: row; flex-wrap: wrap; } . container { flex-flow: row wrap; } .container { flex-direction: column; flex-wrap: nowrap; } . container { flex-flow: column nowrap; }
  • 28. <div class="container"> <div class="item first">I'm the first</div> <div class="item second">I'm the second</div> <div class="item third">I'm the third</div> </div> .item.first { order: 2; } .item.second { order: 3; } .item.third { order: 1; }
  • 29. .container { display: flex; flex-flow: row wrap; justify-content: center; align-items: center; align-content: stretch; } .item { flex: 1 1 auto; order: 2; }
  • 32. .container { display: -webkit-flexbox; display: -ms-flexbox; display: flex; -webkit-flex-flow: column nowrap; -ms-flex-flow: column nowrap; flex-flow: column nowrap; justify-content: flex-end; -ms-flex-pack: end; flex-pack: end; -ms-flex-line-pack: distribute; flex-line-pack: distribute; align-content: space-around; } .item { -webkit-flex: 1 1 100px; -ms-flex: 1 1 100px; flex: 1 1 100px; -ms-flex-order: -1; flex-order: -1; order: -1; }
  • 42. HTTP://HTML5.BY/BLOG/FLEXBOX/ HTTP://CSS-TRICKS.COM/SNIPPETS/CSS/A-GUIDE-TO-FLEXBOX/ HTTP://CSS-TRICKS.COM/USING-FLEXBOX/ HTTP://CANIUSE.COM/#FEAT=FLEXBOX HTTPS://GITHUB.COM/POSTCSS/AUTOPREFIXER HTTP://WWW.W3.ORG/TR/CSS3-FLEXBOX/