/
index.html
174 lines (148 loc) · 4.44 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="author" content="Gordon Mei" />
<title>Ken Burns Effect with CSS3 - Studio Gordon Mei - Lab</title>
<style type="text/css">
* {
margin:0;
padding:0;
font:normal 14pt "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue","Helvetica","Arial",sans-serif;
font-weight:300;
}
body {
background-color:#000;
text-align:center;
}
a:link, a:visited, a:focus, a:active {
color:#009aff;
text-decoration:none;
}
a:hover {
color:#ff5c80;
text-decoration:line-through;
}
#kodakmoment {
margin:10% auto 0 auto;
overflow:hidden;
border:1px solid #222;
width:600px;
height:431px;
}
#kodakmoment img#photogenic {
-webkit-transition:all 1.0s ease-in-out;
/* -webkit-animation-name:pan,fade; */
-webkit-animation-duration:12.0s;
-webkit-animation-iteration-count:infinite;
}
/* Primary animation */
.primary {
-webkit-animation-name:pan,fade !important;
border-color:lime;
border-width:5px;
}
@-webkit-keyframes fade {
0% {opacity:0.5;}
50% {opacity:1.0;}
100% {opacity:0.5;}
}
@-webkit-keyframes pan {
0% {-webkit-transform:translate(0,0) scale(1.0);}
100% {-webkit-transform:translate(-20px,-100px) scale(1.3);}
}
/* Alternate animation */
.secondary {
-webkit-animation-name:pantoo,fadetoo !important;
border-color:pink;
border-width:5px;
}
@-webkit-keyframes fadetoo {
0% {opacity:0.5;}
50% {opacity:1.0;}
100% {opacity:0.5;}
}
@-webkit-keyframes pantoo {
0% {-webkit-transform:translate(0,-100px) scale(1.0);}
100% {-webkit-transform:translate(20px,0) scale(1.3);}
}
/* Cache images using multiple backgrounds on hidden element */
#cache {
position:absolute;
bottom:0;
left:0;
display:none;
width:1px;
height:1px;
background:
url(armadilloaerospace.jpg) top left no-repeat,
url(sts116spacewalk.jpg) top left no-repeat,
url(sts130.jpg) top left no-repeat;
}
#sosumi {position:absolute; bottom:0; right:0; margin:1em; font-size:10pt; color:#ccc;}
#sosumi a {font-size:10pt;}
#sosumi a:hover {text-decoration:none; color:#abc;}
#sosumi p {color:#999;}
</style>
<link rel="shortcut icon" href="../../favico.png" type="image/png" />
</head>
<body>
<div id="kodakmoment"><img src="sts130.jpg" width="800" height="531" alt="Pan and Zoom" id="photogenic" class="primary" /></div>
<div id="sosumi">
2010. <a href="http://www.monstercyb.org/gordon">Monstercyb.org</a>. A part of the <a href="http://www.ocf.berkeley.edu/~gordeon">GordeonBleu</a> network. Images are public domain, courtesy of NASA.
</div>
<div id="cache"></div>
<script type="text/javascript">
var kodakmoment = document.getElementById("kodakmoment");
var photogenic = document.getElementById("photogenic");
var imageFilenames = ["armadilloaerospace.jpg","sts116spacewalk.jpg","sts130.jpg"];
var imageFilenamesLength = imageFilenames.length;
var i=0;
var isItFadeName;
function nextImage(e) {
isItFadeName = e.animationName=="fade" || e.animationName=="fadetoo";
if (isItFadeName && i<imageFilenamesLength) {
//change to next image file
photogenic.setAttribute("src", imageFilenames[i]);
i++;
if(i%2 == 0) {
photogenic.className = "primary";
}
else {
photogenic.className = "secondary";
}
}
else if (isItFadeName && i>=imageFilenamesLength) {
//return to the beginning of the array with the first file
i=0;
photogenic.setAttribute("src", imageFilenames[i]);
i++;
if(i%2 == 0) {
photogenic.className = "primary";
}
else {
photogenic.className = "secondary";
}
}
else {
return false;
}
}
//kodakmoment.addEventListener("webkitAnimationStart", fireStarter, false);
kodakmoment.addEventListener("webkitAnimationIteration", nextImage, false);
//kodakmoment.addEventListener("webkitAnimationEnd", atLast, false);
</script>
<!--Created: 2010 April 7-->
<!--Revised: 2010 April 8-->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-299058-9");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>