forked from desandro/masonry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
element-sizing.html
63 lines (55 loc) · 1.69 KB
/
element-sizing.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>element sizing</title>
<link rel="stylesheet" href="sandbox.css" />
<style>
/* #container { width: 501px; }*/
.item, .grid-sizer { width: 20%; }
.item.w2 { width: 40%; }
.item.w3 { width: 60%; }
</style>
</head>
<body>
<h1>element sizing</h1>
<div id="container" class="container">
<div class="grid-sizer"></div>
<div class="item"></div>
<div class="item h4"></div>
<div class="item w2 h2"></div>
<div class="item w2"></div>
<div class="item h3"></div>
<div class="item w3"></div>
<div class="item"></div>
<div class="item h4"></div>
<div class="item"></div>
<div class="item w2 h4"></div>
<div class="item w2"></div>
<div class="item h5"></div>
<div class="item w3"></div>
<div class="item"></div>
<div class="item h4"></div>
<div class="item"></div>
<div class="item w2 h5"></div>
<div class="item w2"></div>
<div class="item h3"></div>
<div class="item w3"></div>
<div class="item"></div>
</div>
<script src="../bower_components/ev-emitter/ev-emitter.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
<script src="../bower_components/fizzy-ui-utils/utils.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
<script src="../masonry.js"></script>
<script>
var container = document.querySelector('#container');
var msnry = new Masonry( container, {
columnWidth: '.grid-sizer',
percentPosition: true
});
</script>
</body>
</html>