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

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.
主站蜘蛛池模板: 吐鲁番市| 延边| 云南省| 天气| 思茅市| 耒阳市| 桐柏县| 锡林浩特市| 霍邱县| 嘉善县| 辉南县| 文化| 晋宁县| 丰镇市| 聂荣县| 耒阳市| 云林县| 泰和县| 平湖市| 兴义市| 兴义市| 游戏| 东明县| 赤峰市| 新郑市| 长白| 金寨县| 龙山县| 皋兰县| 扎兰屯市| 济宁市| 台中县| 焉耆| 繁昌县| 德安县| 苍溪县| 公主岭市| 游戏| 内乡县| 井冈山市| 威远县|