-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask1-jiugongge.html
52 lines (42 loc) · 1.21 KB
/
task1-jiugongge.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 name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" media="screen and (min-width: 400px)
and (max-device-width: 600px)" href="smallScreen.css" />
<title>九宫格</title>
<style>
.box {
width:500px;
height:500px;
margin: 0 auto;
position: relative;
}
.box div{
width:31%;
height:31%;
background-color: #FDA410;
margin:1%;
border-radius: 10px;
float:left;
}
</style>
</head>
<body>
<div class="box">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
<!-- <head>中用link标签引入了自动检测屏幕大小进行调整的样式表(CSS3引入的Media Query模块);
除此之外也可以选择在外部css中使用:
@import url("tinyScreen.css") screen and(max-device-width: 400px); -->