forked from garand/sticky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-right.html
49 lines (47 loc) · 1.1 KB
/
example-right.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
<!doctype html>
<html>
<head>
<title>Sticky Plugin</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.sticky.js"></script>
<script>
$(window).load(function(){
$("#sticker").sticky({ topSpacing: 50 });
});
</script>
<style>
body {
height: 10000px;
padding: 0;
margin: 0;
}
#sticker {
background: #bada55;
color: white;
width: 300px;
font-family: Droid Sans;
font-size: 40px;
line-height: 1.6em;
font-weight: bold;
text-align: center;
padding: 20px;
text-shadow: 0 1px 1px rgba(0,0,0,.2);
border-radius: 50px;
float:right;
}
#wrapper {
width:700px;
margin:0 auto;
}
</style>
</head>
<body>
<div id="wrapper">
<p>This is test this is text this is text at the top.</p>
<div id="sticker">
<p>This is the sticky thingy that is really cool.</p>
</div>
<p>This is test this is text this is text at the bottom.</p>
</div>
</body>
</html>