/
index2.htm
49 lines (39 loc) · 1.5 KB
/
index2.htm
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
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>2C2D</title>
<meta name="author" content="2C2D, Thomas Brasington" />
<meta name="copyright" content="2C2D, Thomas Brasington" />
<meta name="company" content="2C2D, Thomas Brasington" />
<!--[if lt IE 9]>
<script src="script/shiv.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="css/style2.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var a = 175, b = 45, c = 42, d = 195, e = 66, f = 43;
var aDir = 1, bDir = 1, cDir = 1, dDir = 1, eDir = 1 , fDir = 1;
var header = $('header');
setInterval(function() {
if(aDir == 1){ a++; } else { a--; }
if(bDir == 1){ b++; } else { b--; }
if(cDir == 1){ c++; } else { c--; }
if(dDir == 1){ d++; } else { d--; }
if(eDir == 1){ f++; } else { e--; }
if(fDir == 1){ e++; } else { f--; }
if(a>=255){a=254;aDir=0}if(a<=0){a=1;aDir=1}if(b>=100){b=99;bDir=0}if(b<=0){b=1;bDir=1}if(c>=100){c=99;cDir=0}if(c<=0){c=1;cDir=1}if(d>=255){d=254;dDir=0}if(d<=0){d=1;dDir=1}if(e>=100){e=99;eDir=0}if(e<=0){e=1;eDir=1}if(f>=255){f=254;fDir=0}if(f<=0){f=1;fDir=1};
header.css('background-image', '-webkit-linear-gradient(left, hsl('+a+','+b+'%,'+c+'%) 0%, hsl('+d+','+e+'%,'+f+'%) 100%)')
},1500)
});
</script>
</head>
<body>
<header>
<hgroup>
<div>2C2D</div>
</hgroup>
</header>
</body>
</html>