-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
86 lines (84 loc) · 3.16 KB
/
index.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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>Brick Wall</title>
<meta name="keywords" content="Brick Wall">
<meta name="description" content="Brick Wall">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="js/jquery-1.11.2.js"></script>
<script src="js/brickwall.js"></script>
<script>
var IMG_DATA = [
{width:800,height:600,src:"./img/古风古韵1.jpg"},
{width:598,height:356,src:"./img/古风古韵2.jpg"},
{width:616,height:430,src:"./img/古风古韵3.jpg"},
{width:778,height:583,src:"./img/古风古韵4.jpg"},
{width:480,height:720,src:"./img/古风古韵5.jpg"},
{width:760,height:300,src:"./img/古风古韵6.jpg"},
{width:1000,height:707,src:"./img/古风古韵7.jpg"},
{width:500,height:350,src:"./img/古风古韵8.jpg"},
{width:750,height:562,src:"./img/古风古韵9.jpg"},
{width:1024,height:768,src:"./img/古风古韵10.jpg"},
{width:800,height:600,src:"./img/古风古韵11.jpg"},
{width:1001,height:707,src:"./img/古风古韵12.jpg"},
{width:992,height:455,src:"./img/古风古韵13.jpg"},
{width:650,height:337,src:"./img/古风古韵14.jpg"},
{width:800,height:600,src:"./img/古风古韵15.jpg"},
{width:1001,height:750,src:"./img/古风古韵16.jpg"},
{width:780,height:551,src:"./img/古风古韵17.jpg"},
{width:800,height:600,src:"./img/古风古韵18.jpg"},
{width:1024,height:751,src:"./img/古风古韵19.jpg"},
{width:1024,height:727,src:"./img/古风古韵20.jpg"}
]
// for( var prop in IMG_DATA){
// console.info(IMG_DATA[prop]);
// }
function doLayout() {
$("#demo").brickwall({brickMargin:5,rowBaseHeight: 150,data:IMG_DATA});
console.info("brick wall layout");
};
$(window).load(function() {
doLayout();
$(window).resize(function(event) {
doLayout();
});
});
</script>
</head>
<body>
<!--[if lt IE 9]>
<style>.browsehappy {margin: .2em;background: #ccc;color: #000;padding: .5em;}</style>
<p class="browsehappy">
您使用的浏览器 <strong>版本过低</strong>
,请
<a href="http://browsehappy.com/">升级您的浏览器</a>
以获得更好的体验。
</p>
<script src="vendor/html5shiv.js"></script>
<![endif]-->
<!-- CONTENT -->
<style>
body{
margin: 0 2%;
background: #666;
overflow-y: scroll;
}
#demo{
/*width: 600px;*/
/*height: 20px;*/
}
#demo .brick-item{
transition: transform .3s;
}
#demo .brick-item:hover{
transform: scale(1.1);
}
</style>
<h1>Brick Wall</h1>
<div class="brick-wall" id="demo">
</div>
<a href="https://github.com/myqianlan/brickwall"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
</body>
</html>