-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMedia Queries.html
More file actions
68 lines (63 loc) · 1.51 KB
/
Media Queries.html
File metadata and controls
68 lines (63 loc) · 1.51 KB
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
/* Media Queries */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="/CSS/style.css" />
<style>
/*
Media Queries is basically used for to build responsive websites
*/
div {
height: 50px;
width: 50px;
background-color: aqua;
}
@media (width: 600px) {
#box1 {
background-color: rebeccapurple;
}
/*
ei code e bola hoacche
jodi screen size e width 600px hoy
tahole oi div ta rebeccapurple hoye jabe
*/
}
@media (min-width: 600px) {
#box1 {
background-color: red;
}
/*
ei code e
display size 600 ba er upre hoile div gular color red hoye jabe
*/
}
@media (max-width: 500px) {
#box1 {
background-color: green;
}
/*
ekhane display'r width jokhon 0 to 500 px
tokhon div'r color green hbe
*/
}
/*Media query uses in range */
@media (min-width: 200px) and (max-width: 400px) {
#box2 {
background-color: red;
}
/*
it's mean width screen width jokhon 200px theke 400px er moddhe thakbe
tokhon ei box2 ta red hbe
*/
}
</style>
</head>
<body>
<div id="box1">box1</div>
<br />
<div id="box2">box2</div>
</body>
</html>