css grid layout in practice
css grid layout in practice
https://caniuse.com/#search=grid

subgrid

https://caniuse.com/#search=calc

tutorials
https://css-tricks.com/snippets/css/complete-guide-grid/


grid & animation
https://codepen.io/xgqfrms/pen/jOEEOWg
See the Pen CSS Grid Layout: Animation by xgqfrms
(@xgqfrms) on CodePen.
grid & function
https://css-tricks.com/snippets/css/complete-guide-grid/#article-header-id-4

https://codepen.io/xgqfrms/pen/JjoojYN
See the Pen CodePen Home That Grid Thing Everybody Loves 'Cause It's Awesome by xgqfrms
(@xgqfrms) on CodePen.
grid layout
https://codepen.io/webgeeker/pen/GRgRVBZ
<!-- CSS Grid -->
<h1 class="title">CSS GRID</h1>
<div class="wrapper">
<div class="header">HEADER</div>
<div class="menu">MENU</div>
<div class="content">CONTENT</div>
<div class="footer">FOOTER</div>
</div>
.wrapper {
display: grid;
grid-template-columns: repeat(12, 1fr);
/* 水平 12 col 布局 */
grid-template-rows: 40px 100px 40px;
/* 垂直,3 row 高度 */
/* overflow: auto; */
}
.wrapper > div {
padding-left: 20px;
color: #ffeead;
display: flex;
align-items: center;
font-size: 20px;
/* min-width: 200px; */
}
.header {
grid-column: span 12;
}
.menu {
grid-column: span 4;
}
.content {
grid-column: span 8;
}
.footer {
grid-column: span 12;
}
@media screen and (max-width: 480px) {
.header {
grid-column: span 6;
}
.menu {
/* 指定所在的 row 为 1 */
grid-row: 1;
grid-column: span 6;
}
.content {
grid-column: span 12;
}
}
See the Pen css grid layout demo by xgqfrms
(@webgeeker) on CodePen.
grid container
...
grid item





css grid & fallback
https://www.smashingmagazine.com/2017/11/css-grid-supporting-browsers-without-grid/
https://codepen.io/webgeeker/pen/LYEPqwe
* { box-sizing: border-box; }
body {
margin: 40px;
background-color: #fff;
color: #444;
font: 1.4em Arial, sans-serif;
}
.grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-auto-rows: 100px;
grid-gap: 20px;
}
.grid > * {
padding: 10px;
border: 5px solid rgba(214,129,137,.5);
border-radius: 5px;
background-color: rgba(233,78,119,.5);
color: #fff;
float: left;
width: 33%;
}
@supports (display:grid) {
.grid > * {
width: auto;
}
}
https://zellwk.com/blog/calendar-flexbox-fallback/
@supports
特征检测, flexbox 渐进增强(grid 优雅降级)
https://developer.mozilla.org/en-US/docs/Web/CSS/@supports

https://caniuse.com/#search=@supports

/* flexbox 渐进增强 */
.day-of-week,
.date-grid {
display: flex;
}
/* grid 优雅降级 */
@supports (display: grid) {
.day-of-week,
.date-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
}
.date-grid button:first-child {
grid-column: 6;
}
}
CSS3 Grid Layout
http://www.csstutorial.org/css-grid-tutorial.html
https://www.cnblogs.com/xgqfrms/p/10771746.html
https://www.cnblogs.com/xgqfrms/p/10896992.html
refs
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
css grid layout in practice的更多相关文章
- CSS: Grid Layout Module
Grid Layout The CSS Grid Layout Module offers a grid-based layout system, with rows and columns, mak ...
- [CSS] Get up and running with CSS Grid Layout
We’ll discuss the display values pertinent to CSS Grid Layout – grid, inline-grid, and subgrid. Then ...
- CSS Grid Layout In Action
CSS Grid Layout In Action CSS 异形网格布局实战 refs https://static-nginx-online.fbcontent.cn/tutor/tutor-ybc ...
- 各个浏览器开启CSS Grid Layout的方式
2017年3月,Chrome.Firefox将开启默认支持. 当然对于很多人等不及浏览器默认支持,想提前体验一把,这里提供一些打开方式: 1.Chrome 在浏览器中输入:chrome://flags ...
- CSS Grid layout布局
CSS Grid布局 (又名"网格"),是一个基于二维网格布局的系统,主要目的是改变我们基于网格设计的用户接口方式.你只需要定义一个容器元素并设置display:grid,使用gr ...
- CSS grid layout
CSS网格布局用于将页面分割成数个主要区域,或者用来定义组件内部元素间大小.位置和图层之间的关系. 像表格一样,网格布局让我们能够按行或列来对齐元素. 但是,使用CSS网格可能还是比CSS表格更容 ...
- CSS grid layout demo 网格布局实例
直接 上代码,里面我加注释,相当的简单, 也可以去我的github上直接下载代码,顺手给个星:https://github.com/yurizhang/micro-finance-admin-syst ...
- 关于CSS Grid Layout的代码解释
.wrapper { display: grid; /*生成grid类型块级网格*/ grid-template-columns: repeat(3, 1fr); /*设置显示的列网格线,且重复3次1 ...
- css之Grid Layout详解
css之Grid Layout详解 CSS Grid Layout擅长将页面划分为主要区域,或者在从HTML基元构建的控件的各个部分之间定义大小,位置和图层之间的关系. 与表格一样,网格布局使作者能够 ...
随机推荐
- NodeJS入门学习教程
一.概念 1.什么是nodejs Node.js是JavaScript 运行时环境,通俗易懂的讲,Node.js是JavaScript的运行平台 Node.js既不是语言,也不是框架,它是一个平台 2 ...
- LibreOJ #10047
应同机房某大佬的要求来写这篇题解 Description 给定一个字符串 \(S\) 和一个数 \(K\),要求求出 \(S\) 的所有形似 \(A+B+A\) 的子串数量,其中 \(\mid A\m ...
- mac或linux常见命令
1. 用某个软件打开某文件,如subline text: https://blog.csdn.net/Cinderella_hou/article/details/82392139 如果想使用subl ...
- Cmder的findstr问题
在环境变量中加入C:\windows\system32即可
- NFS服务、SSHD服务
本章内容: NFS服务 SSHD服务 NFS服务 NFS(Network File System)即网络文件系统,用以在网络上与他人共享文件和目录:NFS是运行在应用层的协议:基于Client/Ser ...
- dedecms织梦搜索页错乱的解决方法
在使用DEDE程序所架设的网站时,使用搜索结果页展示的问题上,由于font样式飘红问题,导致页面错乱,今天来解决这个问题. 织梦程序的搜索结果原理很简单,利用font加入颜色样式赋予搜索结果,所以显示 ...
- MyBatis逆向工程生成dao层增删改查方法解释使用(转载)
int countByExample(BUserExample example); //根据条件查询数量 /** * 示例 * public int countByExample() { * BUse ...
- Java一些概念
1.Java先编译后解释 同一个.class文件在不同的虚拟机会得到不同的机器指令(Windows和Linux的机器指令不同),但是最终执行的结果却是相同的. 2.JDK包含JRE,JRE包含JVM, ...
- 分组背包 例题:hdu 1712 ACboy needs your help
分组背包需求 有N件物品,告诉你这N件物品的重量以及价值,将这些物品划分为K组,每组中的物品互相冲突,最多选一件,求解将哪些物品装入背包可使这些物品的费用综合不超过背包的容量,且价值总和最大. 解题模 ...
- Codeforces Beta Round #92 (Div. 2 Only) B. Permutations
You are given n k-digit integers. You have to rearrange the digits in the integers so that the diffe ...