-
Notifications
You must be signed in to change notification settings - Fork 6
/
test.html
73 lines (70 loc) · 1.61 KB
/
test.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
<html>
<head>
<style>
.header {
background-color:black;
color:white;
text-align:center;
padding:5px;
}
.nav {
line-height:30px;
background-color:#eeeeee;
height:300px;
width:100px;
float:left;
padding:5px;
}
.active {
font-weight:bold;
}
.section {
width:350px;
float:left;
padding:10px;
}
.footer {
background-color:black;
color:white;
clear:both;
text-align:center;
padding:5px;
}
</style>
</head>
<body>
<div class="header">
<h1>City Gallery</h1>
</div>
<div class="nav">
<ul>
<li><a href="#section-london" onclick="fun1()">London</a></li>
<li><a href="#section-paris" onclick="fun2()">Paris</a></li>
</ul>
</div>
<div id="section-london" >
<h2>London</h2>
<p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
</div>
<div id="section-paris"style="display:none" >
<h2>Paris</h2>
<p>Paris, France's capital, is a major European city and a global center for art, fashion, gastronomy and culture. Its picturesque 19th-century cityscape is crisscrossed by wide boulevards and the River Seine. </p>
</div>
<script>
function fun1(){
var x=document.getElementById('section-london');
var y=document.getElementById("section-paris");
//x.style.color="green";
x.style.display="block";
y.style.display="none";
}
function fun2(){
var y=document.getElementById("section-london");
var x=document.getElementById("section-paris");
x.style.display="block";
y.style.display="none";
}
</script>
<div class="footer">Footer</div>
</body>
</html>