-
Notifications
You must be signed in to change notification settings - Fork 0
/
navDemo.css
99 lines (84 loc) · 1.58 KB
/
navDemo.css
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
* {
margin: 0;
padding: 0;
}
a {
text-decoration: none;
}
body {
height: 100vh;
background: grey url(./wall.jpg) no-repeat center center;
background-size: cover; /* 就算屏幕超级大都没问题 */
}
/*
todo 内联元素居中,在父元素上添加text-align: center;
*/
main {
text-align: center;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.wrapper {
display: inline-block;
background: rgba(255,255,255, 0.2);
border-radius: 10px;
}
#content > div:nth-child(2) {
margin-left: -22px;
}
#content > div:nth-child(3) {
margin-left: -90px;
}
/*
todo 父元素releative 子元素absoluted
*/
kbd {
border: 1px solid red;
width: 50px;
height: 40px;
display: inline-block;
text-transform: uppercase;
position: relative;
}
kbd > button {
position: absolute;
right: 0;
bottom: 0;
display: none;
}
kbd:hover > button {
display: inline-block;
}
.key {
border-radius: 7px;
border: 1px solid #373737;
font-size: 16px;
/*line-height: 40px;*/
font-family: Helvatical;
width: 50px;
height: 40px;
color: #C5C5C5;
background: linear-gradient(to bottom, #292929 0%,#111111 100%);
box-shadow: 0 0 0 1px #1A1B1C, 0 0 0 2px #1F2020, 0 2px 0 2px #1F2020;
position: relative;;
}
.key .icon-img {
width: 16px;
height: 16px;
position: absolute;
left: 4px;
bottom: 2px;
}
.key .text {
position: absolute;
left: 4px;
top: 2px;
}
.out-div {
margin: 16px;
}
.out-div .key {
margin: 0 10px;
}