当前位置:网站首页>Flex layout
Flex layout
2022-07-25 15:28:00 【꧁ small ۣۖ Pigeon ۣۖ Puzi ۣۖ ิ꧂】
Traditional solutions for layout , Based on the box model , rely on display attribute + position attribute + float attribute .
It is very inconvenient for those special layouts , such as , Vertical centering is not easy to achieve .2009 year ,W3C Put forward a new scheme ----Flex Layout , It's easy 、 complete 、 Responsive implementation of various page layouts .
at present , It's supported by all browsers , It means , Now you can use this function safely
One 、Flex What is the layout ?
Flex yes Flexible Box Abbreviation , Meaning for " Elastic layout ", To provide maximum flexibility for box models . Any container can be specified as Flex Layout .
.box{
display: flex;
}
Inline elements can also be used Flex Layout .
.box{
display: inline-flex;
}
Webkit Browser for kernel , Have to add -webkit Prefix .
.box{
display: -webkit-flex; /* Safari */
display: flex;
}
Set up Flex After the layout , The child element float、clear and vertical-align invalid ;
Two 、 Basic concepts
use Flex Elements of layout , be called Flex Containers (flex container), abbreviation " Containers ".
All its child elements automatically become container members , be called Flex project (flex item), abbreviation " project ".
The container has two axes by default : Horizontal spindle (main axis) And the vertical cross axis . Starting position of spindle ( The intersection with the border ) be called main start, The ending position is called main end; The starting position of the cross axis is called cross start, The ending position is cross end.
Items are arranged along the main axis by default . The spindle space occupied by a single project is called main size, The space occupied by the cross axis is called cross size.
边栏推荐
- matlab randint,Matlab的randint函数用法「建议收藏」
- 单例模式3--单例模式
- Tasks, micro tasks, queues and scheduling (animation shows each step of the call)
- Record a redis timeout
- 记一次redis超时
- My creation anniversary
- Spark partition operators partitionby, coalesce, repartition
- Endnote 无法编辑range 解决
- MySQL installation and configuration super detailed tutorial and simple database and table building method
- 使用cpolar建立一个商业网站(如何购买域名)
猜你喜欢

Image cropper example

Spark提交参数--files的使用

伤透脑筋的CPU 上下文切换

MySQL installation and configuration super detailed tutorial and simple database and table building method

Outline and box shadow to achieve the highlight effect of contour fillet

MySql的安装配置超详细教程与简单的建库建表方法

Spark submission parameters -- use of files

Application of object detection based on OpenCV and yolov3

Spark partition operators partitionby, coalesce, repartition

Idea护眼色设置
随机推荐
2019陕西省省赛K-变种Dijstra
ML - 自然语言处理 - 关键技术
ML - 图像 - 深度学习和卷积神经网络
ML - natural language processing - Basics
Instance tunnel use
Remember that spark foreachpartition once led to oom
《图书馆管理系统——“借书还书”模块》项目研发阶段性总结
盒子躲避鼠标
Image cropper example
Submarine cable detector tss350 (I)
How to understand the maximum allowable number of errors per client connection of MySQL parameters in Seata?
wait()和sleep()的区别理解
Record a redis timeout
Xcode added mobileprovision certificate file error: Xcode encoded an error
window系统黑窗口redis报错20Creating Server TCP listening socket *:6379: listen: Unknown error19-07-28
Solve the timeout of dbeaver SQL client connection Phoenix query
ZOJ - 4114 Flipping Game-dp,合理状态表示
CF566A-贪心+字典树
在网页上实现任意格式的音视频快速播放功能的开发总结。
解决DBeaver SQL Client 连接phoenix查询超时