-
Notifications
You must be signed in to change notification settings - Fork 0
/
d3_greensock2.html
185 lines (150 loc) · 3.17 KB
/
d3_greensock2.html
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<style>
body {
background-color:#1d1d1d;
font-family: Signika Negative, sans-serif;
color:#989898;
margin:0px;
font-size:18px;
}
h1, h2, h3 {
font-family: "Signika Negative", sans-serif;
margin: 10px 0 10px 0;
color:#f3f2ef;
font-weight: 400;
}
h1 {
font-size:42px;
}
h2 {
font-size:24px;
}
h3 {
font-size:22px;
}
p{
line-height:22px;
margin-bottom:16px;
}
a {
color: #88ce02;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
#demo {
height:100%;
position:relative;
}
.box {
width:50px;
height:50px;
position:relative;
border-radius:6px;
margin-top:4px;
display:inline-block;
line-height:50px;
text-align:center;
color:#333;
}
.green{
background-color:#6fb936;
}
.orange {
background-color:#f38630;
}
.grey {
background-color:#989898;
}
button {
display:inline-block;
outline: none;
border: none;
padding: 8px 14px;
background: #414141;
background-image: -webkit-linear-gradient(top, #575757, #414141);
background-image: -moz-linear-gradient(top, #575757, #414141);
background-image: -ms-linear-gradient(top, #575757, #414141);
background-image: -o-linear-gradient(top, #575757, #414141);
background-image: linear-gradient(to bottom, #575757, #414141);
text-shadow: 0px 1px 0px #414141;
-webkit-box-shadow: 0px 1px 0px 414141;
-moz-box-shadow: 0px 1px 0px 414141;
box-shadow: 0px 1px 0px 414141;
color: #ffffff;
text-decoration: none;
margin: 0 auto;
-webkit-border-radius: 4;
-moz-border-radius: 4;
border-radius: 4px;
padding: 12px 25px;
font-family: "Signika Negative", sans-serif;
text-transform: uppercase;
font-weight: 600;
cursor: pointer;
font-size: 13px;
line-height: 18px;
}
button:hover {
background: #57a818;
background-image: -webkit-linear-gradient(top, #57a818, #4d9916);
background-image: -moz-linear-gradient(top, #57a818, #4d9916);
background-image: -ms-linear-gradient(top, #57a818, #4d9916);
background-image: -o-linear-gradient(top, #57a818, #4d9916);
background-image: linear-gradient(to bottom, #57a818, #4d9916);
text-shadow: 0px 1px 0px #32610e;
-webkit-box-shadow: 0px 1px 0px fefefe;
-moz-box-shadow: 0px 1px 0px fefefe;
box-shadow: 0px 1px 0px fefefe;
color: #ffffff;
text-decoration: none;
}
.brandBar {
position:absolute;
width:100%;
height:40px;
z-index:1000;
line-height:40px;
color:#ccc;
padding-left:0px;
}
.nav{
margin:20px 0;
}
.brandBar img{
position:absolute;
width:90px;
right:20px;
top:12px;
}
.wrapper {
position:absolute;
padding:20px;
}
.wrapper {
margin-top:16px;
}
.box {
display:block;
position:relative;
}
</style>
<div class="wrapper">
<div class="box green"></div>
<div class="box orange"></div>
<div class="box grey"></div>
</div>
<div class="brandBar">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/GreenSock-logo-text-outlines.svg"></div>
<script src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/TweenMax-latest-beta.js?v=carlschooff"></script>
<script>
window.onload = function() {
TweenLite.to(".box", 2, { x: function() {
return Math.random() * 500;
},
y: function() {
return Math.random() * 500;
}
});
};
</script>