当前位置:网站首页>Grid layout frequently asked interview questions
Grid layout frequently asked interview questions
2022-07-25 19:20:00 【MOAN.】
Grid The benefits of grid layout are no less than Flex, It can quickly divide the layout into desired modules , and flex The opening method is the same , A word of display:grid You can start
Here we will directly introduce the portal , You can read teacher Ruan Yifeng's blog , Not only Flex The flexible layout is well written ,Grid The grid layout is also very Nice
CSS Grid Grid layout tutorial - Ruan Yifeng's Weblog (ruanyifeng.com)
Today, I want to share with you a few words about Grid Frequent high-frequency interview questions
1 Grid How to achieve something similar to flex:row-reverse The effect of
adopt grid-auto-flow and direction
grid-auto-flow:row|column|dense This attribute specifies that grid How to sort the elements inside the container of the layout
direction:rt|Irt Specify text The horizontal direction of the table column
2. Box trisection
1.Grid
.grid-container {
display: grid;
grid-template-columns: 1fr 1fr 1fr(fr=fraction);
gap: 1rem;
}
[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-MthSqgDx-1657715104306)(https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/8612c42a8a024db884b28f9dcf36197a~tplv-k3u1fbpfcp-watermark.image?)]
According to the latest standards , Of the above three property names grid- The prefix has been removed ,grid-column-gap and grid-row-gap It's written in column-gap and row-gap,grid-gap It's written in gap.
2.flex
.flex-container {
display: flex;
flex-wrap: wrap;
// gap: 1rem;
.item {
flex: 0 0 calc(100% / 3);
}
}
3.Grid The advantages of
Flex The layout is the axis layout , Only... Can be specified " project " For the position of the axis , It can be seen as a one-dimensional layout .
Grid The layout is to divide the container into " That's ok " and " Column ", Generate cells , Then designate " Where the project is " Cells of , It can be seen as a two-dimensional layout . Grid The layout is much better than Flex Strong layout
Refer to the blog from Shanyue , Really a good helper for interview
【Q506】Grid The layout is similar to how to realize flex: row-reverse | css High frequency interview questions | Interview questions for large factories one a day (shanyue.tech)
Reprint : Welcome to reprint , But without the author's consent , This statement must be retained ;
If you have questions, you can kick me in the comment area
边栏推荐
- Alibaba cloud free SSL certificate application detailed process
- JS 基本类型 引用类型 深/浅克隆复制
- 平衡二叉树
- HTTP缓存通天篇,可能有你想要的
- 网络数据包多层传输演示
- Fearless of high temperature and rainstorm, how can Youfu network protect you from worry?
- iMeta | Sangerbox: 交互式整合临床生信分析平台
- 聊聊sql优化的15个小技巧
- Pymoo learning (7): Parallelization
- The difference between PHP equal to = = and identity equal to = = =
猜你喜欢

Basic music theory -- configuring chords

Actual combat of MySQL database design project of online mall system

21 days proficient in typescript-4 - type inference and semantic check
![[help center] provide your customers with the core options of self-service](/img/66/5a927e3bdcc165b78d4a9dee324871.png)
[help center] provide your customers with the core options of self-service

【DETR用于3D目标检测】3DETR: An End-to-End Transformer Model for 3D Object Detection

Pymoo学习 (5):收敛性分析

Imeta | sangerbox: interactive integrated clinical information analysis platform

Sccm2012r2 network deployment reinstallation system

高并发下如何保证数据库和缓存双写一致性?

Huawei switch system software upgrade and security vulnerability repair tutorial
随机推荐
小程序毕设作品之微信校园维修报修小程序毕业设计成品(8)毕业设计论文模板
Hongmeng - Damiao computing Sketchpad - Introduction
Eve - 0day Threat Intelligence
Improvement of wechat applet 28 hot search list ①
某公司网络设计与规划
Wechat campus maintenance and repair applet graduation design finished product (7) Interim inspection report
哪吒 D1-H 测试 microbench
Huawei recruited "talented teenagers" twice this year; 5.4 million twitter account information was leaked, with a selling price of $30000; Google fired engineers who believed in AI consciousness | gee
Monitor MySQL based on MySQL exporter
Talk about 15 tips of SQL optimization
How to be a self disciplined person?
Improvement of wechat applet 26 playing music page ②
Wechat campus maintenance and repair applet graduation design finished product of applet completion work (4) opening report
What is the application value of MES management system
网上商城系统MySql数据库设计项目实战
基于Mysql-Exporter监控Mysql
Pymoo学习 (6):终止条件
帝国CMS整站|手机号/QQ靓号商城源码|适配移动端
Use of swift basic codable (jsonencoder jsondecoder)
Wechat campus maintenance and repair application applet graduation design finished product of applet completion work (6) opening defense ppt