Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Whether the flex layout belongs to css3

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the relevant knowledge of "whether the flex layout belongs to css3". The editor shows you the operation process through the actual case. The operation method is simple, fast and practical. I hope that this article "whether the flex layout belongs to css3" can help you solve the problem.

The flex layout belongs to the abbreviation css3;flex is "Flexible Box", which means "flexible layout" and is used to provide maximum flexibility for the box model. Any container can be specified as a flex layout with the syntax of "box {display:flex;}".

The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.

Does the flex layout belong to css3?

Flex layout belongs to css3, and layout is a key application of CSS.

In 2009, W3C put forward a new scheme-Flex layout, which can realize all kinds of page layout simply, completely and responsively.

What is the layout of Flex?

Flex is the abbreviation of Flexible Box, which means "flexible layout" and is used to provide maximum flexibility to the box model.

Any container can be specified as a Flex layout.

.box {display: flex;}

Inline elements can also be laid out using Flex.

.box {display: inline-flex;}

Browsers with Webkit kernel must be prefixed with-webkit.

.box {display:-webkit-flex; / * Safari * / display: flex;}

Note that when set to the Flex layout, the float, clear, and vertical-align attributes of the child elements are invalidated.

II. Basic concepts

Elements that use Flex layouts are called Flex containers (flex container), or "containers" for short. All its child elements automatically become container members, called Flex projects (flex item), or "projects" for short.

By default, the container has two axes: a horizontal principal axis (main axis) and a vertical cross axis (cross axis). The start position of the spindle (the intersection with the border) is called main start, and the end position is called main end;. The start position of the cross axis is called cross start, and the end position is called cross end.

Projects are arranged along the principal axis by default. The spindle space occupied by a single project is called main size, and the cross-axis space occupied by a single project is called cross size.

This is the end of the content about "whether the flex layout belongs to css3". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report