当前位置:网站首页>Disadvantages of flex layout
Disadvantages of flex layout
2022-08-08 05:45:00 【Cirrod】
1. Compatibility
flex layout can be used on pc, mobile, applet, etc., but there are compatibility problems for various browsers, mainly compatibility problems of IE browser, IE browser version requires IE9 or above to use flex layout

2. The vertical layout attribute is invalid
When the height of the box is indeterminate (when the box is squeezed apart by the height of the content), When the height of the box is not set, at this time not suitable to use flex layout
Application scenarios:

As shown above:
When our list items are unsure how many, we can'tSet the height to the parent box, because the flex layout will fail (no effect) in the vertical direction when the parent box does not have a certain height,
For example, setting the following properties to the parent box of the list will not work:
flex-direction: column;justify-content: space-between;At this time, we need to use magic and padding to achieve the above effect
3. Cases
Document
In the browser

You can see that the justify-content: space-between of the ul tag does not take effect
4. Summary
Flex layout has many advantages. Using flex layout and positioning can quickly complete the layout effect. It is also the most commonly used technology when we develop pages, but felxThe layout has compatibility issues for IE version 9 and below and when the parent box does not have a height setWhen in vertical orientation cannot use flex layout
边栏推荐
猜你喜欢
随机推荐
线索二叉树
Database sub-database sub-table, when?How to divide?
字符串哈希 哈希值
Day8:面试必考编程题(细心OJ)
日常bug小结:
仿QQ好友列表,QListWidget!
Checkerboard Coloring Problem
云计算和云服务,云计算
Go-Excelize API源码阅读(十)—— SetActiveSheet(index int)
研发医疗器械产品需要做的测试
flex布局属性简约速记
postgresql中连接两张表更新第三张表(updata)
The tests that need to be done in the development of medical device products
Leetcode sword 】 refers to the Offer (special commando) summary
【js基础】js的垃圾回收机制/内存回收机制
Flutter 教程之高效且精美的滚动组件Slivers (教程含源码)
神经网络参数量和计算量,神经网络是参数模型吗
为什么互联网大厂一边疯狂裁员,一边不停招聘?
"Public Administration" exam key points and answers
std::thread创建线程,使用std::ref()传递类对象参数









