-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelitu.html
82 lines (74 loc) · 3.2 KB
/
relitu.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="./css/htmleaf-demo.css" rel="stylesheet">
<link href="./css/nav.css" rel="stylesheet">
<link href="./css/index.css" rel="stylesheet">
<link href="./css/relitu.css" rel="stylesheet">
<link href="./bootstrap-3.4.1-dist/css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="./js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="./js/jquery-3.1.0.js"></script>
<script>
$(function () {
$.get("nav.html", function (data) {
$(".nav").html(data);
});
$('ul button').click(function () {
//切换标签样式
$(this).addClass('active').siblings().removeClass('active');
//切换div显示隐藏
$('#wrap>div').eq($(this).index()).show().siblings().hide();
$( this ).addClass( 'active' ).siblings().removeClass( 'active' );
//也可以直接写成一句话,和上面两句分着写效果是一样的
// $(this).addClass('active').siblings().removeClass('active').parent().next().children().eq($(this).index()).show().siblings().hide();
});
})
</script>
<title>热力图</title>
</head>
<body>
<div id="placehold" style="width: 180px;height: 100%; float: left"></div>
<div class="card">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<!-- Split button -->
<div class="form-inline" style="width:900px;margin-left: 0px;padding: 0px;display: inline-block;">
<label style="margin: 15px 60px 15px 50px;font-size: 20px;">热力图</label>
</div>
</div>
</div>
</nav>
<table>
<tr>
<td style="width:20%;">
<div>
<ul id="tabTitle" style="width:10%;height:400px;">
<button type="button" class="btn btn-primary active">商城一层</button>
<button type="button" class="btn btn-primary">商城二层</button>
<button type="button" class="btn btn-primary">商城三层</button>
</ul>
</div>
</td>
<td>
<div id="wrap" style="width: 600px; height: 400px">
<div id="div1" style="display: block;width: 700px; height: 400px;border:0px">
<img src="images/f1.png" style="width: 700px; height: 400px">
</div>
<div id="div2" style="display: block;width: 700px; height: 400px;display:none;border:0px">
<img src="images/f2.png" style="width: 700px; height: 400px">
</div>
<div id="div3" style="display: block;width: 700px; height: 400px;display:none;border:0px">
<img src="images/f3.png" style="width: 700px; height: 400px">
</div>
</div>
</td>
</tr>
</table>
</div>
<!-- 左侧导航栏 -->
<div class="nav"></div>
</body>
</html>