-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUCI.html
36 lines (36 loc) · 1.22 KB
/
UCI.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
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<title>Test</title>
<style type="text/css">
*{margin:0;padding:0;}
div#container{position: relative;margin: 0 auto;width: 330px;border:1px solid #000;}
div.row{float: left;margin:0px 0px 0px 10px;width:150px;}
div.children{margin:10px 0 10px 0;width: 150px;text-align: center;
border: 1px solid #000;}
div.po{clear:both;}
</style>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
</head>
<body dataType=0>
<div id="container" >
<div class = "row"></div>
<div class = "row"></div>
<div class = "po"></div>
</div>
</body>
<script type="text/javascript">
var data = ['120px','130px','80px','60px','70px','50px','110px','100px','50px','60px'];
var el = $('#container .row');
for(var i = 0;i < data.length;i++) {
var listOne = el.eq(0).height(),
listTwo = el.eq(1).height();
if (listOne <= listTwo) {
el.eq(0).append('<div class="children"style="height:'+data[i]+';line-height:'+data[i]+';">'+i+'</div>');
} else {
el.eq(1).append('<div class="children"style="height:'+data[i]+';line-height:'+data[i]+';">'+i+'</div>');
}
}
</script>
<script type="text/javascript" src='jingyangfengxiang.js'></script>
</html>