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基元构建的控件的各个部分之间定义大小,位置和图层之间的关系. 与表格一样,网格布局使作者能够 ...
随机推荐
- 分布式kv存储系统之Etcd集群
etcd是什么? etcd是一个高可用的分布式键值数据库,可用于服务发现,etcd采用 raft 一致性算法,基于 Go 语言实现.其特点有简单易用,所谓简单易用是指安装配置简单,提供http/htt ...
- LOJ10144宠物收养所
HNOI 2004 最近,阿 Q 开了一间宠物收养所.收养所提供两种服务:收养被主人遗弃的宠物和让新的主人领养这些宠物. 每个领养者都希望领养到自己满意的宠物,阿 Q 根据领养者的要求通过他自己发明的 ...
- SpringMVC听课笔记(一:SpringMVC概述)
地址 :https://www.bilibili.com/video/av14907450 版本:4.x 概述: 概要: 一:SpringMVC概述 二:SpringMVC的 HelloWorld 三 ...
- springboot源码解析-管中窥豹系列之web服务器(七)
一.前言 Springboot源码解析是一件大工程,逐行逐句的去研究代码,会很枯燥,也不容易坚持下去. 我们不追求大而全,而是试着每次去研究一个小知识点,最终聚沙成塔,这就是我们的springboot ...
- Codeforces Round #628 (Div. 2) B. CopyCopyCopyCopyCopy(Set)
题意: 给你一个数组,可以像题目那样无限拼接,问递增子序列的最大长度(可不连续). 思路: 序列的最大长度即为数组中不同元素的个数. Tips: 一开始不知道back-to-back什么意思,看到题目 ...
- fzu2178礼物分配 (状压+二分)
Problem Description 在双胞胎兄弟Eric与R.W的生日会上,他们共收到了N个礼物,生日过后他们决定分配这N个礼物(numv+numw=N).对于每个礼物他们俩有着各自心中的价值vi ...
- CodeForces - 449B 最短路(迪杰斯特拉+堆优化)判断最短路路径数
题意: 给出n个点m条公路k条铁路. 接下来m行 u v w //u->v 距离w 然后k行 v w //1->v 距离w 如果修建了铁路并不影响两点的最短距离, ...
- KVM Pass-through 上部署 MiniSMB HurricaneII
KVM Pass-through 上部署 MiniSMB HurricaneII 免费网络测试,是一款专门用于测试无线控制器, 智能路由器,网络交换机的性能和稳定性的软硬件相结合的工具.可以通过此工具 ...
- keepalived.conf说明
keepalived.conf说明 发表于 2017-06-04 | 分类于 运维相关 , Keepalived | | 阅读次数 348 | 字数统计 1,889 | 阅读时长预计 8 本文主要介绍 ...
- 设计模式(二十三)——策略模式(Arrays源码分析)
1 编写鸭子项目,具体要求如下: 1) 有各种鸭子(比如 野鸭.北京鸭.水鸭等, 鸭子有各种行为,比如 叫.飞行等) 2) 显示鸭子的信息 2 传统方案解决鸭子问题的分析和代码实现 1) 传统的设计方 ...