File tree 1 file changed +61
-0
lines changed
1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+
4
+ < head >
5
+ < meta charset ="UTF-8 ">
6
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
+ < title > CSS media query</ title >
8
+ < style >
9
+ body {
10
+ background-color : red;
11
+ }
12
+
13
+ @media screen and (orientation : portrait) {
14
+ body {
15
+ border : 2px solid purple;
16
+ }
17
+ }
18
+
19
+ @media only screen and (max-width : 455px ){
20
+ body {
21
+
22
+ background-color : blue;
23
+ }
24
+
25
+ .boxes {
26
+ flex-direction : column;
27
+ }
28
+ }
29
+
30
+ /* @media not|only mediatype and (expressions) {
31
+ CSS-Code;
32
+ } */
33
+
34
+ .boxes {
35
+ display : flex;
36
+ }
37
+
38
+ .box {
39
+ width : 344px ;
40
+ height : 344px ;
41
+ background-color : steelblue;
42
+ padding : 3px ;
43
+ margin : 3px ;
44
+ }
45
+
46
+ </ style >
47
+ </ head >
48
+
49
+ < body >
50
+ < div >
51
+ Hey I am a red body guy!
52
+ </ div >
53
+
54
+ < div class ="boxes ">
55
+ < div class ="box "> </ div >
56
+ < div class ="box "> </ div >
57
+ < div class ="box "> </ div >
58
+ </ div >
59
+ </ body >
60
+
61
+ </ html >
You can’t perform that action at this time.
0 commit comments