当前位置:网站首页>弹性布局(display:flex下 align-content、justify-content、align-items三个属性的作用和效果
弹性布局(display:flex下 align-content、justify-content、align-items三个属性的作用和效果
2022-07-25 03:34:00 【No Bug】
align-content属性
作用:设置同一列子元素在Y轴的对齐方式
| 属性值 | 描述 |
|---|---|
| flex-start | 排列在当前列的最上方 |
| flex-end | 排列在当前列的最下方 |
| center | 排列在当前列的中间位置 |
| space-between | 间距相等排列,上下不留白 |
| space-around | 间距相等排列,上下留白等于间距的一半 |
justify-content属性
作用:设置同一行子元素在X轴的对齐方式
| 属性值 | 描述 |
|---|---|
| flex-start | 排列在当前行的最左边 |
| flex-end | 排列在当前行的最右边 |
| center | 排列在当前行的中间位置 |
| space-between | 间距相等排列,两边不留白 |
| space-around | 间距相等排列,两边留白等于间距的一半 |
align-items属性
作用:设置同一行子元素在Y轴的对齐方式
| 属性值 | 描述 |
|---|---|
| flex-start | 排列在当前行的最上方 |
| flex-end | 排列在当前行的最下方 |
| center | 排列在当前行的中间位置 |
| stretch | 当子元素没有设置高度或为auto,将占满整个容器的高度 |
| baseline | 以子元素第一行文字的基线对齐 |
边栏推荐
- Force button brushing question 61. rotating linked list
- Brief understanding of operational amplifier
- mysql_ Backup restore_ Specify table_ Backup table_ Restore table_ innobackup
- The dolphin scheduler calls the shell script and passes multiple parameters
- File permission management
- Hw2021 attack and defense drill experience - Insights
- Moveit2 - 6. Planning scene monitor
- mysql_ Account authorization permission recycling, account locking and unlocking, account creation and deletion
- 10. 509 Certificate (structure + principle)
- Advantages and disadvantages of zero trust security
猜你喜欢

Acwing 870. approximate number

Network security - information hiding - use steganography to prevent sensitive data from being stolen

Merge sort / quick sort

Message queue (MQ)

Flink1.15 source code reading - Flink annotations

Chrome process architecture

Imeta | ggclusternet microbial network analysis and visualization nanny level tutorial

Direct insert sort / Hill sort

Brief understanding of operational amplifier

File permission management
随机推荐
[template engine] microservice Learning Notes 6: freemaker
Swagger key configuration items
Common methods of array
Record once C # extract audio files with ffmempeg
Question D: pruning shrubs
Solution: owner's smart site supervision cloud platform
Leetcode programming practice -- Tencent selected 50 questions (I)
Node queries the path of all files (files or folders) named filename under the target directory
Bgy development small example
From input URL to page presentation
Time formatting
C language introduction practice (9): completion judgment
How to use two queues to simulate the implementation of a stack
Take a note: Oracle conditional statement
Modulenotfounderror: no module named 'pyemd' solution
Day 9 (capture traffic and routing strategy)
mysql_ Case insensitive
MySQL configuration in CDH installation
Moveit2 - 10.urdf and SRDF
MIM command