当前位置:网站首页>Mobile terminal -flex item attribute
Mobile terminal -flex item attribute
2022-07-29 05:45:00 【Ice eyes JS】
1.align-self Alignment of individual items on the cross axis
flex-start
: Align the starting points of the intersecting axes .flex-end
: The ends of the intersecting axes are aligned .center
: Align the midpoint of the intersecting axis .baseline
: Baseline alignment of the first line of text for the project .stretch
( The default value is ): If the project is not set to height or set to auto, Will occupy the height of the whole project .
.box .con:nth-of-type(1){
background-color: #f00;
/* align-self: auto; */
/* align-self: flex-start; */
align-self: flex-end;
/* align-self: center; */
}
2.order
Property defines the order in which items are arranged . The smaller the numerical , The further up the line , The default is 0 , It can only be integers
.box .con:nth-of-type(2){
background-color: #0f0;
order: 1;
}
3.flex-grow
Attribute defines the magnification of the item , The default is 0
, That is, if there is any remaining space , And don't zoom in
.box .con:nth-of-type(2){
background-color: #0f0;
flex-grow: 2;
}
.box .con:nth-of-type(3){
background-color: #00f;
flex-grow: 1;
}
4.flex-shrink
Attribute defines the reduction ratio of the project , The default is 1, That is, if there is not enough space , The project will shrink .
.box .con{
width: 200px;
height: 200px;
flex-shrink: 1;
}
5.flex-basis
Property defines before allocating extra space , Spindle space occupied by the project (main size).
Browser according to this property , Calculate if the spindle has extra space . Its default value is
auto
, The original size of the project .It can be set to follow
width
orheight
Property is the same value ( such as 350px), Then the project will occupy a fixed space .
6.flex
The attribute is flex-grow
, flex-shrink
and flex-basis
Abbreviation , The default value is 0 1 auto
. The last two properties are optional .
边栏推荐
- [C language series] - constants and variables that confuse students
- Hcia-r & s self use notes (25) NAT technical background, NAT type and configuration
- 从Starfish OS持续对SFO的通缩消耗,长远看SFO的价值
- Qt布局管理--部件拉伸(Stretch)原理及大小策略(sizePolicy)
- Similarities and differences between REM and PX and EM
- PHP如何生成二维码?
- 移动端-flex项目属性
- Relationship between link and @import
- DAY5:PHP 简单语法与使用
- 加密资产熊市之下,PlatoFarm的策略玩法依旧能获得稳定收益
猜你喜欢
What is wapiti and how to use it
【TypeScript】深入学习TypeScript函数
MySQL解压版windows安装
MOVE PROTOCOL全球健康宣言,将健康运动进行到底
[sword finger offer] - explain the library function ATOI and simulate the realization of ATOI function
Wapiti是什么以及使用教程
[C language series] - three methods to simulate the implementation of strlen library functions
DAY15:文件包含漏洞靶场手册(自用 file-include 靶场)
Day14: upload labs customs clearance tutorial
Laravel服务容器(继承与事件)
随机推荐
Question swiping Madness - leetcode's sword finger offer58 - ii Detailed explanation of left rotation string
IDEA使用JDBC连接MySQL数据库个人详细教程
【电子电路】ADC芯片如何选型
365 day challenge leetcode1000 question - day 036 binary tree pruning + subarray and sorted interval sum + delete the shortest subarray to order the remaining arrays
dcat 批量操作弹窗及参数传递
DAY6:利用 PHP 编写登陆页面
[C language series] - constants and variables that confuse students
微信小程序更改属性值-setData-双向绑定-model
相对定位和绝对定位
基础爬虫实战案例之获取游戏商品数据
Detailed installation and use tutorial of MySQL (nanny installation with pictures and texts)
第五空间智能安全⼤赛真题----------PNG图⽚转换器
nmap是什么以及使用教程
365 day challenge leetcode 1000 questions - day 035 one question per day + two point search 13
重绘与回流的关系
Wechat applet - screen height
【TypeScript】TypeScript中类型缩小(含类型保护)与类型谓词
QFrame类学习笔记
How does the MD editor of CSDN input superscripts and subscripts? The input method of formula and non formula is different
熊市下PLATO如何通过Elephant Swap,获得溢价收益?