-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (47 loc) · 1.53 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
<!DOCTYPE html>
<html>
<head>
<title>Greetings</title>
<style type="text/css">
body {
background: #444;
background: -webkit-gradient(linear, left top, right bottom, from(#444444), to(#111111));
background: -moz-linear-gradient(left top, #444444, #111111);
}
#note {
position: absolute;
width: 300px;
height: 300px;
padding: 20px;
border: 0;
-webkit-box-shadow: 0px 0px 10px #000;
-moz-box-shadow: 0px 0px 10px #000;
box-shadow: 0px 0px 10px #000;
font-size: 18px;
font-family: "museo sans";
background: #ffa;
background: -webkit-gradient(linear, center top, center bottom, from(#fea), to(#fd7));
background: -moz-linear-gradient(center top, #fea, #fd7);
}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
if (localStorage.noteText) {
$("#note").val(localStorage.noteText);
}
$("#note").keyup(function(){
localStorage.noteText = $("#note").val();
});
$(window).resize(function(){
$("#note").css('left', ($(window).width()/2) - ($("#note").width()/2) - 20 + "px");
$("#note").css('top', ($(window).height()/2) - ($("#note").height()/2) - 20 + "px");
});
$(window).resize();
});
</script>
</head>
<body>
<textarea id="note"></textarea>
</body>
</html