forked from kombai/freewall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfix-position.html
93 lines (90 loc) · 2.54 KB
/
fix-position.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
<!DOCTYPE html>
<html>
<head>
<title>Fixed position block</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<meta name="description" content="Fixed position block" />
<meta name="keywords" content="javascript, dynamic, grid, layout, jquery plugin, flex layouts"/>
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../freewall.js"></script>
<style type="text/css">
.free-wall {
margin: 15px;
}
</style>
</head>
<body>
<div class='header'>
<div class="clearfix">
<div class="float-left">
<h1><a href="http://vnjs.net/www/project/freewall/">Free Wall</a></h1>
<div class='target'>Creating dynamic grid layouts.</div>
</div>
</div>
</div>
<div id="freewall" class="free-wall">
<div class="brick size32" data-position="2-2">
<div class='cover'>
<h2>Fixed postion at</h2>
<p> top: 2 </p>
<p> left: 2</p>
</div>
</div>
<div class="brick size22"></div>
<div class="brick size12"></div>
<div class="brick size22"></div>
<div class="brick size22"></div>
<div class="brick size11"></div>
<div class="brick size23"></div>
<div class="brick size22"></div>
<div class="brick size22"></div>
<div class="brick size22"></div>
<div class="brick size11"></div>
<div class="brick size22"></div>
<div class="brick size22"></div>
<div class="brick size11"></div>
<div class="brick size23"></div>
<div class="brick size22"></div>
<div class="brick size21" data-position="0-0">
<div class='cover'>
<h2>Copyright</h2>
<p> © 2013 Minh Nguyen </p>
<p> Released under the MIT license</p>
</div>
</div>
</div>
<script type="text/javascript">
var colour = [
"rgb(142, 68, 173)",
"rgb(243, 156, 18)",
"rgb(135, 0, 0)",
"rgb(211, 84, 0)",
"rgb(0, 106, 63)",
"rgb(192, 57, 43)",
"rgb(39, 174, 96)",
"rgb(41, 128, 185)"
];
$(".brick").each(function() {
this.style.backgroundColor = colour[colour.length * Math.random() << 0];
});
$(function() {
var wall = new freewall("#freewall");
wall.reset({
selector: '.brick',
animate: true,
cellW: 160,
cellH: 160,
onResize: function() {
wall.fitWidth();
}
});
wall.addCustomEvent('onBlockLoad', function(setting){
console.log(setting);
});
wall.fitWidth();
});
</script>
</body>
</html>