当前位置:网站首页>Flex layout principle and common parent elements
Flex layout principle and common parent elements
2022-07-26 05:13:00 【Dummerd】
One .flex Layout principle
use Flex Elements of layout , be called flex Containers , All its child elements automatically become container members , be called Flex project
summary flex Layout principle :
By adding flex attribute , To control the position and arrangement of sub boxes
Two . Common parent properties
1.flex-direction: Set the spindle direction
2.justify-content: Set the arrangement of sub elements on the spindle
3.flex-wrap: Set whether the child element should wrap
4.align-content: Set the arrangement of the child elements on the side axis ( Multiple lines )
5.align-items: Set the arrangement of the child elements on the side axis ( A single )
6.flex-flow: Compound attribute , It's equivalent to setting flex-direction and flex-wrap
3、 ... and .flex-direction Set the direction of the spindle
flex-direction Property determines the direction of the spindle ( That is, the arrangement direction of the project )
Be careful : The main shaft and side shaft will change , Just look flex-direction Who is the spindle set to , The rest is the side shaft , And our child elements are sorted according to the main axis
row The default is left to right
row-reverse From right to left
column From top to bottom
column-reverse From bottom to top
Four .justify-content Set the arrangement of sub elements on the spindle
justify-content Property defines the alignment of the item on the spindle
Be careful : Before using this property, be sure to determine which spindle is
flex-start Default start from scratch , If the spindle is X Axis , From left to right
flex-end From the tail
center Align in the center of the spindle ( If the spindle is x The axis is centered horizontally )
space-around Divide the remaining space equally
spance-between We'll stick the edges on both sides first In bisecting the remaining space
5、 ... and .flex-wrap Set whether the child element should wrap
nowrap The default value is , Don't wrap
wrap Line break
边栏推荐
- mysql如果计算本月变动/本月增幅/同比变动/同比增幅?
- Week 6 Learning Representation: Word Embedding (symbolic →numeric)
- Meta analysis [whole process, uncertainty analysis] method based on R language and meta machine learning
- ALV report flow diagram
- MySQL八股知识点:从入门到删库
- JVM第五讲:纵横数据如何应对洪峰推送
- Mathematical modeling and optimization analysis based on general optimization software gams
- Leetcode linked list problem - 206. reverse linked list (learn linked list by one question and one article)
- C语言函数
- MySQL基础学习
猜你喜欢

JVM第五讲:纵横数据如何应对洪峰推送

MySQL eight knowledge points: from getting started to deleting the database

Getaverse,走向Web3的远方桥梁

When AQS wakes up the thread, I understand why it traverses from the back to the front

Date and time function of MySQL function summary

Excel VBA: realize automatic drop-down filling formula to the last line

测试必备工具之Fiddler,你真的了解吗?
![[acwing] 2983. Toys](/img/e4/f71949a00ae604703d2b39bffb7c80.png)
[acwing] 2983. Toys

JVM第二讲:类加载机制

Compilation method of flood control evaluation report and flood modeling under the new guidelines
随机推荐
Migrate the server and reconfigure the database (the database has no monitoring, and the monitoring starts with tns-12545, tns-12560, tns-00515 errors)
How many holes have you stepped on in BigDecimal?
The elderly who claim alimony from other children after being supported by their widowed daughter-in-law should be supported
npm操作指令
【洛谷】P1383 高级打字机
测试用例评审如何开展
Alibaba three sides: how to solve the problems of MQ message loss, duplication and backlog?
LeetCode链表问题——206.反转链表(一题一文学会链表)
Unity scene jump script
ThreadLocal transfer between parent and child threads in asynchronous
Nacos introduction and deployment
基于遥感解译与GIS技术环境影响评价图件制作
Test of countlaunch demo
A material of machine learning
Learn to map with nature medicine -- complex heat map
Redis solves the problem of oversold inventory
嵌入式开发小记,实用小知识分享
Security permission management details
BigDecimal 的 4 个坑,你踩过几个?
Leetcode linked list problem - 206. reverse linked list (learn linked list by one question and one article)