- 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.
推薦閱讀
- C++程序設計教程
- SoapUI Cookbook
- What's New in TensorFlow 2.0
- Getting Started with CreateJS
- 看透JavaScript:原理、方法與實踐
- Swift 3 New Features
- RabbitMQ Essentials
- 常用工具軟件立體化教程(微課版)
- Scratch趣味編程:陪孩子像搭積木一樣學編程
- Scala編程(第5版)
- 視窗軟件設計和開發自動化:可視化D++語言
- Getting Started with Electronic Projects
- Java 9 with JShell
- WordPress Search Engine Optimization(Second Edition)
- Flask開發Web搜索引擎入門與實戰