-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss.code-snippets
64 lines (64 loc) · 1.15 KB
/
css.code-snippets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
"左右垂直居中": {
"prefix": "flex center",
"body": [
"display: flex;",
"justify-content: center;",
"align-items: center;$0"
]
},
"占满父元素": {
"prefix": "absolute full",
"body": [
"position: absolute;",
"top: 0;",
"right: 0;",
"bottom: 0;",
"left: 0;$0"
]
},
"圆边框": {
"prefix": "border circle",
"body": [
"border: 1px solid;",
"border-radius: 50%;$0"
]
},
"通用图标样式": {
"prefix": ".icon",
"body": [
".icon {",
" width: 1em; height: 1em;",
" vertical-align: -0.15em;",
" fill: currentColor;",
" overflow: hidden;",
"}$0"
]
},
"绝对定位不定宽高居中": {
"prefix": "absolute center",
"body": [
"position: absolute;",
"top: 50%;",
"left: 50%;",
"transform: translate(-50%,-50%);$0",
]
},
"单行文字省略": {
"prefix": "ellipsis one",
"body": [
"overflow: hidden;",
"text-overflow: ellipsis;",
"white-space: nowrap;$0"
]
},
"多行文字省略": {
"prefix": "ellipsis more",
"body": [
"overflow: hidden;",
"display: -webkit-box;",
"-webkit-line-clamp: ${1: 3};",
"-webkit-box-orient: vertical;$0"
]
}
}