-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstyle.css
156 lines (130 loc) · 3.02 KB
/
style.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
body {
font-size: 1em;
line-height: 1.4;
background: black;
color: #ddd;
margin: 0;
padding: 2em;
}
div.example {
position: relative; /* Needed to overlap SVGs */
height: 300px; /* Needed to avoid layout changes as text animates */
}
p {
font-size: 1.2em;
line-height: 1.4;
font-family: 'Rambla', sans-serif;
}
h1 {
margin: 0;
padding: 0;
font-size: 3em;
color: rgba(0,255,255,0.5);
font-family: 'Kavoon', cursive;
}
div.forward h1 {
text-shadow: rgba(255,0,0,0.5) 4px 0px 0px; /* Shift red shadow right (extrude) */
}
div.backward h1 {
text-shadow: rgba(255,0,0,0.5) -4px 0px 0px; /* Shift red shadow left (sink) */
}
div.sinkandpop h1 {
-webkit-animation-name: textSinkandpop;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-delay: .12s;
}
div.grow h1 {
-webkit-animation-name: textGrow;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-delay: .12s;
}
@-webkit-keyframes textSinkandpop {
from {
text-shadow: rgba(255,0,0,0.5) 6px 0px 0px; /* Shift red shadow right (extrude) */
-webkit-animation-timing-function: ease-out;
}
50% {
text-shadow: rgba(255,0,0,0.5) -6px 0px 0px; /* Shift red shadow left (sink) */
}
to {
text-shadow: rgba(255,0,0,0.5) 6px 0px 0px; /* Shift red shadow right (extrude) */
-webkit-animation-timing-function: ease-out;
}
}
@-webkit-keyframes textGrow {
from { /* Small and sunken */
font-size: 4em; /* Grow font */
text-shadow: rgba(255,0,0,0.5) -6px 0px 0px; /* Shift red shadow left (sink) */
-webkit-animation-timing-function: ease-out;
}
50% {
font-size: 2em; /* Shrink font */
text-shadow: rgba(255,0,0,0.5) 6px 0px 0px; /* Shift red shadow right (extrude) */
}
to {
font-size: 4em; /* Grow font */
text-shadow: rgba(255,0,0,0.5) -6px 0px 0px; /* Shift red shadow left (sink) */
-webkit-animation-timing-function: ease-out;
}
}
svg {
position: absolute;
}
div.forward svg.layer-red,
div.backward svg.layer-cyan {
left: 10px;
}
svg.layer-cyan polygon {
fill: rgba(0,255,255,0.5);
}
svg.layer-red polygon {
fill: rgba(255,0,0,0.5);
}
div.container-layer {
position: absolute;
}
div.container {
width: 200px;
height: 200px;
float: left;
}
div.container figure {
display: block;
width: 55px;
height: 55px;
float: left;
margin: 5px;
font-size: 1.4em;
font-family: 'Rambla', sans-serif;
text-align: center;
}
#cyan figure {
background: rgba(0,255,255,0.5);
}
#red figure {
background: rgba(255,0,0,0.5);
}
#cyan div.container {
-webkit-perspective: 200px;
}
#cyan div.container-left figure {
-webkit-transform: rotateY( 45deg );
}
#cyan div.container-right figure {
-webkit-transform: rotateY( -45deg );
}
#red div.container {
-webkit-perspective: 100px;
}
#red div.container-left figure {
-webkit-transform: rotateY( 35deg );
}
#red div.container-right figure {
-webkit-transform: rotateY( -35deg );
}
#red div.container-left {
margin-left: -5px;
margin-right: 10px;
}