-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathAmazing-NavBar-effect.css
108 lines (95 loc) · 2.26 KB
/
Amazing-NavBar-effect.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
99
100
101
102
103
104
105
106
107
108
@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700");
#Amazing-NavBar-effect {
margin: 0;
padding: 0;
min-height: 100vh;
font-family: 'Open Sans', sans-serif;
box-sizing: border-box;
color: #333;
font-size: 100%;
line-height: 1.5;
background-image: url(blacka.jpeg);
background-size: cover;
}
nav {
--duration: .5s;
--easing: ease-in-out;
position: relative;
width: 220px;
margin: 20px;
}
nav ol {
list-style-type: none;
margin: 0;
padding: 0;
}
nav li {
margin: -4px 0 0 0;
}
nav a {
display: block;
text-decoration: none;
background: #fff;
transform-origin: 0 0;
transition: transform var(--duration) var(--easing), color var(--duration) var(--easing);
transition-delay: var(--delay-out);
border-radius: 4px;
padding: 1em 1.52em;
}
nav a:hover {
background: #efefef;
}
nav .sub-menu a {
font-size: .9em;
color: #666666;
border-left: 2em solid white;
padding: .75em;
background: linear-gradient(to right, #dddddd 2px, #ffffff 2px);
}
nav .sub-menu a:hover {
background: linear-gradient(to right, #dddddd 2px, #efefef 2px);
}
nav header {
font-weight: 600;
display: block;
background: rgba(255, 255, 255, 0.5);
transform-origin: 0 0;
transition: transform var(--duration) var(--easing), color var(--duration) var(--easing);
transition-delay: var(--delay-out);
border-radius: 4px;
padding: 1em 1.52em;
}
nav header span {
border: none;
background: transparent;
font-size: 1.5em;
padding: 0;
cursor: pointer;
line-height: 1;
float: right;
}
nav footer button {
position: absolute;
top: 0;
left: 0;
border: none;
padding: calc(1em - 2px);
width: 100%;
transform-origin: 0 0;
transition: transform var(--duration) var(--easing);
transition-delay: calc(var(--duration) + (.1s * (var(--count) / 2)));
cursor: pointer;
outline: none;
background: #cdcdcd;
opacity: 0;
}
nav.closed a,
nav.closed header {
transform: translateY(calc(var(--top) * -1)) scaleY(0.1) scaleX(0.2);
transition-delay: var(--delay-in);
color: transparent;
}
nav.closed footer button {
transition-delay: 0s;
transform: scaleY(0.7) scaleX(0.2);
}