当前位置:网站首页>Flex three column layout
Flex three column layout
2022-07-26 08:13:00 【MonsterQy】
background
Lift three columns
Everyone should think of the layout : Left and right fixed width and height , Adaptive in the middle ( For example, the Grail layout 、 Double wing layout …) But in fact, sometimes in projects, we often encounter another kind of three column layout : Fixed width and height in the middle 、 Left right adaptive Three column layout page . The implementation of the first type of three column layout is diverse , But since css3 In the flex After the layout , adopt flex The realization of the layout is widely praised .
Realization :
The first kind of flex The implementation code is as follows ( Left and right fixed width and height , Adaptive in the middle ):
html structure :
<div class='wrap'>
<div class='left'></div>
<div class='center'></div>
<div class='right'></div>
</div>
css Code :
.wrap{
display:flex;
}
.left,.right{
flex-grow: 1;
}
.center{
width:1200px;
}
The second kind of flex The implementation code is as follows ( Fixed width and height in the middle 、 Left right adaptive ):
html structure :
<div class='wrap'>
<div class='left'></div>
<div class='center'></div>
<div class='right'></div>
</div>
css Code :
.wrap{
display:flex;
}
.left,{
order: -1;
flex: 0 0 100px;
}
.right{
flex: 0 0 100px;
}
.center{
flex-grow: 1;
}
summary :
flex The core point of realizing three column responsiveness in layout is to respond to those who want to have responsive characteristics div Set up flex-grow:;
边栏推荐
- 2022-07-08 group 5 Gu Xiangquan's learning notes day01
- The first ide overlord in the universe, replaced...
- [xshell7 free download and installation]
- Libevent custom event (asynchronous)
- 2w字详解数据湖:概念、特征、架构与案例
- Burp Suite-第一章 Burp Suite 安装和环境配置
- A tutorial for mastering MySQL database audit characteristics, implementation scheme and audit plug-in deployment
- Share high voltage ultra low noise LDO test results
- Exam summary on July 13, 2022
- 分布式相关面试题总结
猜你喜欢

Burp Suite-第五章 如何使用Burp Target

Lnmp+wordpress to quickly build a personal website

Matlab drawing black spots on two / three-dimensional drawings

Team members participate in 2022 China multimedia conference

A tutorial for mastering MySQL database audit characteristics, implementation scheme and audit plug-in deployment

If the thread crashes, why doesn't it cause the JVM to crash? What about the main thread?

线程崩了,为什么不会导致 JVM 崩溃呢?如果是主线程呢?

Burp Suite-第一章 Burp Suite 安装和环境配置

Burp suite Chapter 6 how to use burp spider

数组的介绍--Array
随机推荐
万字长文 | 深入理解 OpenFeign 的架构原理
小蜜蜂吉他谱 高八度和低八度
Burp Suite-第七章 如何使用Burp Scanner
Template summary
2022-07-14 group 5 Gu Xiangquan's learning notes day07
Idea settings set shortcut keys to convert English letters to case in strings
Official Oracle document
有点牛逼,一个月13万+
Shell第二天作业
Stack simulation queue
Common methods of string: construction method, other methods
matplotlib学习笔记
2w字详解数据湖:概念、特征、架构与案例
Using ordered dictionary to copy pcap files
Use js to count the number of occurrences of each string in the string array, and format it into an object array.
Dev gridcontrol captures key events
SPSS用KMeans、两阶段聚类、RFM模型在P2P网络金融研究借款人、出款人行为规律数据
Ten thousand words long article | deeply understand the architecture principle of openfeign
sed作业
Function default parameters, arrow functions, and remaining parameters in ES6 - explanation