- JavaScript by Example
- Dani Akash S
- 192字
- 2021-07-02 18:39:09
Responsive designing with flexbox
If you look into the index.html file of our previous chapter, you will see that there are classes, such as col-md-2, col-xs-2, col-lg-2, col-sm-2, and so on. They are Bootstrap's grid classes. The previous chapter's layout was designed using the Bootstrap grid system. The system divides the page into rows and 12 columns and allocates a specific number of columns to each div in a row depending on the screen size.
There are four different screen sizes:
- Desktop (md)
- Tablets (sm)
- Phones (xs)
- Large desktops (lg)
However, we are not going to use Bootstrap grids in this chapter. We are going to be using a new layout mode introduced in CSS3 called the flexbox. Flexbox or flexible box, as it sounds, provides a box model for creating layouts.
Flexbox is a new layout system, which is actively being implemented by the browser vendors. Support is almost complete; it's time to adopt this standard in projects. A few problems still exist, such as IE 11 only having partial flexbox support and older versions of IE do not support flexbox. Visit https://caniuse.com/ to check details on browser support for flexbox.
推薦閱讀
- 解構產品經理:互聯(lián)網產品策劃入門寶典
- Learning AWS Lumberyard Game Development
- 機械工程師Python編程:入門、實戰(zhàn)與進階
- Learning Neo4j 3.x(Second Edition)
- Getting Started with SQL Server 2012 Cube Development
- Learning Python by Building Games
- Elasticsearch for Hadoop
- Apache Kafka Quick Start Guide
- Python之光:Python編程入門與實戰(zhàn)
- Create React App 2 Quick Start Guide
- R數(shù)據(jù)科學實戰(zhàn):工具詳解與案例分析
- Web App Testing Using Knockout.JS
- JSP程序設計與案例實戰(zhàn)(慕課版)
- Mastering Concurrency in Python
- Practical Predictive Analytics