官术网_书友最值得收藏!

  • 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.
主站蜘蛛池模板: 涞源县| 颍上县| 长沙县| 会东县| SHOW| 建宁县| 建始县| 泉州市| 千阳县| 韶关市| 屏南县| 和林格尔县| 姜堰市| 永年县| 麦盖提县| 合水县| 宁国市| 布拖县| 德清县| 旺苍县| 攀枝花市| 南靖县| 怀宁县| 广东省| 安达市| 江西省| 鹤峰县| 光山县| 临高县| 砚山县| 岗巴县| 阿克陶县| 中西区| 永靖县| 拜城县| 越西县| 余干县| 寿宁县| 房产| 左云县| 永宁县|