当前位置:网站首页>Flex layout
Flex layout
2022-07-24 22:19:00 【m0_ forty-nine million four hundred and seventy-one thousand si】
The traditional layout of web pages is based on box model , rely on display attribute ,position attribute ,float attribute . It is inconvenient for special layout , such as : Vertical layout .W3C Propose new solutions -Flex Layout , Can be simple , complete , Responsive implementation of various page layouts , At present, it has been supported by all browsers .Flex Layout as the first choice of future layout .
Flex What is the layout ?
Flex yes Flexible Box Abbreviation , Means flexible layout , Provides maximum flexibility for boxed models .
Any container can be specified as Flex Layout ,dispaly:flex;
Inline elements can also be used Flex Layout ,display:inline-flex;
Webkit Browser for kernel , Have to add -webkit Prefix ,display:-webkit-flex;display:flex.
Set up Flex After layout , Subelement float、clear and vertical-align Property will fail
Basic concepts , use Flex Elements of layout , be called Flex Containers , All child elements automatically become container members , be called Flex project .
Flex There are two axes by default : Horizontal principal axis and vertical cross axis . The starting position of the spindle is called main start , The end position is mian end; The starting position of the cross axis is relatively cross start, The end position is cross end. Items are arranged along the main axis by default . The spindle space occupied by a single project is relatively small mian size, The cross axis space occupied is called cross size.
Properties of the container :flex-direction flex-wrap flex-flow justify-content align-items align-content
flex-direction Property determines the direction of the spindle flex-direction:row|row-reverse|column|columen-reverse
row: The spindle is horizontal , The starting point is on the left
row-reverse: The spindle is horizontal , The starting point is on the right
column: The spindle is vertical , The starting point is at the top
column-reverse: The spindle is vertical , Starting edge
flex-wrap Attribute definitions , If an axis doesn't line up , How to wrap ,flex-wrap:nowrap|wrap|wrap-reverse.nowrap, Don't wrap ;warp: Line break , The first row is at the top .wrap-reverse: Line break , The first row is at the bottom
flex-flow The attribute is flex-direction and flex-wrap Short form of property , Default row nowarp.flex-flow:<flex-direction>||<flex-wrap>.justify-content Property defines the alignment of the item on the spindle ,justify-content: flex-start | flex-end | center | space-betewwn | space-around.flex-start Align left ,flex-end Right alignment ,center In the middle ,space-between full-justified , The intervals between the items are all equal ,space-around Each item is equally spaced on both sides , The interval between items is twice as large as that between items and borders
边栏推荐
- QT learning vs creating QT items shows instances where object references are not set to objects
- Moving least squares fitting experiment of PCL point cloud processing (62)
- Leetcode: the shortest dice sequence impossible to get [thinking questions + grouping ideas]
- SVM - for linear separability (Part 2)
- PCL点云处理之平面规则化(五十五)
- Gradle learning set integration
- Integrated swagger learning
- GlideModule AppGlideModule和Generated API详解
- Morris traversal
- ICML2022 | 图神经网络的局域数据增强方法
猜你喜欢
随机推荐
PCL点云处理之均匀采样抽稀(六十一)
QT learning vs creating QT items shows instances where object references are not set to objects
C # review the entrustment and event
做好项目管理的10个关键点和5大措施
[postgraduate entrance examination English vocabulary training camp] day 11 - offer, form, maintain, critical
Gradle学习集合整合
CAD text styles
From violent recursion to dynamic programming, memory search
吾爱第二课-去除网页弹窗
头脑风暴之——利用reduce方法重构concat函数
Leetcode 102. sequence traversal of binary tree
Violent recursion - detailed explanation of Queen n & how to optimize with bit operation
Plane regularization of PCL point cloud processing (55)
一键编译安装redis6.2.4
Joint search set structure
使用frp实现内网穿透
PCL点云处理之移动最小二乘拟合实验(六十二)
PCL点云处理之边界提取(五十八)
Shallow copy deep copy
C # use SQLite









