Overview of Flexboxlearning manual

Published on 2023-04-20 00:10:05 · 中文 · بالعربية · Español · हिंदीName · 日本語 · Русский язык · 中文繁體

Cascading Style Sheets (CSS) is a simple design language designed to simplify the process of web page rendering. CSS deals with the look and feel parts of a web page.
With CSS, you can control text color, font style, paragraph spacing, how columns are sized and laid out, background images or colors used, layout design, display variations and screen sizes for different devices, and a variety of other effects.
To determine the position and size of the box, in CSS, you can use one of the available layout modes -
Block Layout - This mode is used to lay out documents. Inline layout - This mode is used to lay out text. Table Layout - This mode is used to lay out tables. Table layout - This mode is used to position elements.
All of these patterns are used to align specific elements such as documents, text, tables, etc., however, none of these patterns provide a complete solution for laying out complex websites. Initially, this was done using a combination of floating elements, anchored elements, and (usually) table layouts. But floating only allows horizontal positioning boxes.

What is an elastic box?

In addition to the above modes, CSS3 provides another layout mode, Flexible Box, commonly called Flexbox
With this pattern, you can easily create layouts for complex applications and web pages. Unlike floating, Flexbox layouts have full control over the orientation, alignment, order, and size of the box.

Features of Flexbox

Here are the notable features of the Flexbox layout-
Direction - You can arrange items on a web page in any direction, such as left-to-right, right-to-left, top-to-bottom, and bottom-to-top. Order - With Flexbox, you can rearrange the order of your web page content. Wrap - If the content of a web page is spatially inconsistent (single line), you can wrap them into multiple lines (horizontal) and vertical. Alignment - With Flexbox, you can align the content of a web page with its container. Resize - With Flexbox, you can increase or decrease the size of items in your page to fit the available space.

Support for browsers

The following are browsers that support Flexbox.
Chrome 29+ Firefox 28+ Internet Explorer 11+ Opera 17+ Safari 6.1+ Android 4.4+ iOS 7.1+