forked from CuriousLLC/angular-sticky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
54 lines (46 loc) · 1.33 KB
/
demo.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
<!doctype html>
<html>
<head>
<title>Angular-Sticky Demo v1.7.5</title>
<style>
body {
padding: 0;
margin: 0;
background-image: url(http://www.georgebenainous.com/web/code/layout_grid.gif);
font-family: sans-serif;
}
.sticky-box {
width: 200px;
height: 200px;
color: #fff;
}
.container {
float: left;
width: 300px;
height: 300px;
padding: 50px;
border-bottom: 0px solid #AEAEAE;
background-color: rgba(0, 0, 0, 0.1);
margin:0 50px 50px 0;
}
</style>
</head>
<body ng-app="demo" style="min-height: 2000px;">
<div class="container">
<div class="sticky-box" style="background-color: blue; margin: 50px;" media-query="min-width: 768px" sticky>Style:<br>margin: 50px;<br><br>Options:<br>media-query="min-width: 768px"</div>
</div>
<div class="container">
<div class="sticky-box" style="background-color: blue;" sticky offset="25">Options:<br>offset="25"</div>
</div>
<div class="sticky-box" style="position: absolute; top: 400px; left: 300px; background-color: red;" sticky>
Style:<br>
position: absolute;<br>
left: 300px;<br>
top: 400px;</div>
<aside role="scripts">
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.min.js"></script>
<script src="sticky.js"></script>
<script>angular.module('demo', ['sticky']);</script>
</aside>
</body>
</html>