-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
49 lines (49 loc) · 1.41 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
nav{border-bottom: 1px solid;}
ul{list-style: none; width: 1200px; height:100px; margin: auto; line-height: 100px;}
li{float:left; width:25%;}
.container{
width: 500px;
margin:auto;
}
.box{border:1px solid #000; margin:10px 0;}
#no1:target{
background-color: yellow;
}
#no2:target{
background-color: rgb(0, 143, 55);
}
#no3:target{
background-color: rgb(0, 143, 55);
}
#no4:target{
background-color: rgb(0, 143, 55);
}
</style>
</head>
<body>
<div id="wrap">
<nav>
<ul>
<li><a href="#no1">1</a></li>
<li><a href="#no2">1</a></li>
<li><a href="#no3">1</a></li>
<li><a href="#no4">1</a></li>
</ul>
</nav>
<div class="container">
<div class="box" id="no1">aaaaaaaaaaaaa</div>
<div class="box" id="no2">aaaaaaaaaaaaa</div>
<div class="box" id="no3">aaaaaaaaaaaaa</div>
<div class="box" id="no4">aaaaaaaaaaaaa</div>
</div>
</div>
</body>
</html>