-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDemo_MediaQuery.html
43 lines (36 loc) · 1.18 KB
/
Demo_MediaQuery.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
<!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>CSS Media Query</title>
<style>
body {
background-color: tan;
color: black;
}
/* On scrren Size less than 992px color should be blue */
@media screen and (max-width: 992px) {
body {
background-color: rgb(91, 73, 109);
color: whitesmoke;
}
}
@media screen and (max-width: 600px) {
body {
background-color: olive;
color: antiquewhite;
}
}
</style>
</head>
<body>
<h1> Resize the browser window to see the action created by Media Query .... </h1>
<p> by Default the Background color of the document is "tan"</p>
<section>
<p>if the Scren Size id less than 992Px or less color will change to blue</p>
<p> of the screen Size is less than 600px , so it will change to olive</p>
</section>
</body>
</html>