-
Notifications
You must be signed in to change notification settings - Fork 0
/
magicgrid_samesize.html
60 lines (58 loc) · 1.59 KB
/
magicgrid_samesize.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
<!DOCTYPE html>
<html lang="ja" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8">
<title>cards</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" lang="ja" xml:lang="ja" content="">
<meta name="keywords" lang="ja" xml:lang="ja" content="">
<link href="https://necolas.github.io/normalize.css/3.0.2/normalize.css" rel="stylesheet">
<script src="https://unpkg.com/magic-grid/dist/magic-grid.min.js"></script>
<style>
body{
width:100%;
margin:0;
padding:0;
}
main{
padding:10px 0;
color:#111;
}
.box{
width:100px;
height: 100px;
background-color:#4b9898;
opacity: 0.5;
text-align: center;
}
</style>
</head>
<body>
<main>
<div class="container">
<div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
<div class="box">5</div>
<div class="box">6</div>
<div class="box">7</div>
<div class="box">8</div>
<div class="box">9</div>
<div class="box">10</div>
<div class="box">11</div>
<div class="box">12</div>
</div>
</main>
<script>
let magicGrid = new MagicGrid({
container: '.container',
animate: true, //prioritize animation
gutter: 20, //margins between cards
static: true,
useMin: true //prioritize small picture
});
magicGrid.listen();
</script>
<body>
</html>