当前位置:网站首页>Invalid flex layout setting width
Invalid flex layout setting width
2022-06-13 08:36:00 【webQiang99】
There is a problem in the project today ,
Part of the page is like this , Because it uses ant design mobile Component library , here
I just used ant In the component library flex Layout , But in ant Component library flex Layout , Not like grid layout , You can define the number of columns per row , Because in ant A row in the component library flex The number of columns in the layout is determined by <Flex.Item> The amount of the , Don't wrap ,
You can see this attribute in the official website component library , So I want to give the width of each child element to the width of the parent element 33.33%, Set to wrap , It should be OK , But after setting up , Found set width It doesn't work , Later, step-by-step debugging was carried out , Found out where the problem is , It is because the child element sets a flex attribute ,flex:1 1,flex The expansion factor leads to width It doesn't work , So I wanted to flex The expansion factor of is set to 0, Is to put flex Set to flex:0 1 It should be OK , After setting, it still doesn't work , So find a solution on Baidu , So I found this article and solved the problem perfectly ,
flex Layout settings width Invalid
Set up flex:0 0 Width to be set ,
I still remember when I was in school , During the interview with Beisen cloud front end , There is a question like this :flex:1 0 Give a width , I forgot the specific width , Then let me talk about the final effect , No answer , Because it is usually used flex Generally, only one attribute is used , Other properties , Rarely used , I usually have problems , I will check Baidu myself , The specific usage of these attributes is rarely remembered , Sometimes I remember and understand , After a long time, I didn't use it very much , I forgot again , Today, I encountered such a problem , I still need to flex I'm looking at the properties .
边栏推荐
- redis. exceptions. ConnectionError: Error 111 connecting to 172.16.8.128:6379. Connection refused.
- System safety and Application
- Explanation of JS event loop mechanism and asynchronous tasks
- logstash配置参考文章
- PHP PNG to webp
- 京东商品详情接口,京东详情页接口,宝贝详情页接口,商品属性接口,商品信息查询,商品详细信息接口,h5详情,京东APP详情,京东api接口,京东历史价格数据接口代码对接分享
- JS ask for the day of the year
- redis.exceptions.ConnectionError: Error 111 connecting to 172.16.8.128:6379. Connection refused.
- Microservice system architecture construction I: Environment Construction
- Input prohibit copy and paste
猜你喜欢
How app inventor accesses resource files in assets directory
SQL injection question type (manual injection +sqlmap)
Buuctf web (VI)
redis. exceptions. ConnectionError: Error 111 connecting to 172.16.8.128:6379. Connection refused.
Disk management and disk partition operation
1.SolidWorks各模块的学习顺序
Wechat upload picture material interface
容器概念和云原生
Remote access and control
HCIP_ Static experiment
随机推荐
Review one flex knowledge point every day
Which is the stronger fresh food distribution and sorting management system?
微服务系统架构搭建一:环境搭建
System safety and Application
Is signed or unsigned selected to create an integer field in MySQL? The answer is as follows:
Guidance process and service control
Process and scheduled task management
Container concept and cloud native
容器概念和云原生
HCIP_ OSPF irregular area
JS - max. of array cases
Tiktok keyword search list interface, ultra detailed interface docking steps
Taobao commodity sales interface / Taobao commodity sales monitoring interface / cumulative commodity sales interface
filebeat采集日志到ELK
File upload question type
anaconda下安装pytorch
Deploy Yum warehouse and NFS shared services
Shellshock Attack Lab
情绪处理技巧
Do not update the sub component page of parameter object passed from parent to child of nailing applet?