[Day22] Emmet 学习笔记 - CSS篇

CSS的简写通常很直觉,会取每个音节的第一个字母来用,但有些似乎是有重叠的关系,就会不太一样,需要特别记一下,不然 tab按下去跑出来是别的标签实在很尴尬。

排版类

位置
pos (pos:r) position:relative;
pos:a position:absolute;
pos:f position:fixed;
t, r, b, l top: right: bottom: left:
层级
z z-index:;
z数字 z-index: 数字;
浮动版
fl (fl:l) float:left;
fl:r float:right;
fl:n float:none;
cl (cl:b) clear:both;
cl:l clear:left;
cl:r clear:right;
cl:n clear:none;
区块
d 或 d:b display:block;
d:n display:none;
d:f display:flex;
d:i display:inline;
d:ib display:inline-block;
d:tb display:table;
d:tbr display:table-row;
d:tbc display:table-cell;
Flex flex灵活好用,一体两面的是属性也特别多
fx flex:;
fxb flex-basis:;
fxd flex-direction:;
fxd:c flex-direction:column;
fxd:cr flex-direction:column-reverse;
fxd:r flex-direction:row;
fxd:rr flex-direction:row-reverse;
fxf flex-flow:;
fxg flex-grow:;
fxsh flex-shrink:;
fxw flex-wrap: ;
fxw:n flex-wrap:nowrap;
fxw:w flex-wrap:wrap;
fxw:wr flex-wrap:wrap-reverse;
jc justify-content:;
jc:c justify-content:center;
jc:fe justify-content:flex-end;
jc:fs justify-content:flex-start;
jc:sa justify-content:space-around;
jc:sb justify-content:space-between;
显示/隐藏 在ov後面加上 x或 y就是 overflow-x或 overflow-y
v (v:h) visibility:hidden;
v:v visibility:visible;
ov (ov:h) overflow:hidden;
ov:v overflow:visible;
ov:s overflow:scroll;
ov:a overflow:auto;

盒模型类

各种距离算计 每天用应该用到烂掉了
bxz (bxz:bb) box-sizing:border-box;
bxz:cb box-sizing:content-box;
m margin:;
m:a margin:auto;
mt, mr, mb, ml margin-(top, right, bottom, left):;
p padding:;
pt, pr, pb, pl padding-(top, right, bottom, left):;
bxsh box-shadow:inset hoff voff blur color;
bxsh:r box-shadow:inset hoff voff blur spread rgb(0, 0, 0);
bxsh:ra box-shadow:inset h v blur spread rgba(0, 0, 0, .5);
bxsh:n box-shadow:none;
w width:;
w:a width:auto;
h height:;
h:a height:auto;
maw max-width:;
mah max-height:;
miw min-width:;
mih min-height:;

字型类

Font & Text 种类非常多,但是只留常用的
f font:;
fw font-weight:;
fw:n font-weight:normal;
fw:b font-weight:bold;
fs font-style: italic;
fz font-size:; (fs和fz容易搞混)
ff font-family:;
ta (ta:l) text-align:left;
ta:c text-align:center;
ta:r text-align:right;
ta:j text-align:justify;
td (td:n) text-decoration:none;
td:u text-decoration:underline;
td:o text-decoration:overline;
td:l text-decoration:line-through;
ti text-indent:;
ti:- text-indent:-9999px; (竟然会有这个trick)

<<:  副业对我来说是什麽

>>:  DAY 17:Builder Pattern,一步一步的建造产品

Day 30 - 下一段的旅途与系列文章总结

就这样写着写着来到了系列赛的最後一天,很开心能够坚持到最後撰写最後一天的文章,今日的分享会补充一下後...

iOS·iOS开发面试-关於底层的那些坑

如果你有时间的,不妨也拿笔本子测试一下,看看能做多少,在文章点赞留言我会第一时间发你答案!或者加我...

Day 22 资料宝石:【Lab】RDS架构 建立自己的第一台云端资料库 (中)

今天我们接续 RDS Lab 实作。 创建第一台 RDS instance 按下左边列表的 Dat...

混合模式-30天学会HTML+CSS,制作精美网站

「混合模式」是什麽呢?有用过photoshop的设计师对图片混合模式肯定不陌生,是元素重叠部分的颜色...

离职倒数21天:「欸,蒲公英是什麽颜色?」谈工作上的沟通问题

有一天男友上完远端的中文课後走出房间,突然问我「欸,蒲公英是什麽颜色?」我觉得以他的习性,突然跟我聊...