-
Notifications
You must be signed in to change notification settings - Fork 0
/
ife_task_1.8.html
65 lines (56 loc) · 2.18 KB
/
ife_task_1.8.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>task 1.8 grid system</title>
<style type="text/css">
*{margin: 0; padding: 0;}
html, body, #container{width: 100%;}
.clearfix:after{content: '.'; display: block; clear: both; height: 0; overflow: hidden;}
.container{box-sizing: border-box; padding: 10px;}
div{border: 1px solid #999; box-sizing: border-box;}
.container div{float: left; background-color: #eee; height: 50px; margin: 10px;}
@media screen and (min-width: 768px){
#item1{width: calc( ( 100% - 60px) / 3 );}
#item2{width: calc( ( 100% - 60px) / 3 );}
#item3{width: calc( ( 100% - 60px) / 3 );}
#item4{width: calc( ( 100% - 80px) / 4 );}
#item5{width: calc( ( 100% - 40px) / 2 );}
#item6{width: calc( ( 100% - 80px) / 4 );}
#item7{width: calc( 100% / 12 - 20px);}
#item8{width: calc( 100% / 12 - 20px);}
#item9{width: calc( 100% / 6 - 20px);}
#item10{width: calc( 100% / 6 - 20px);}
#item11{width: calc( ( 100% - 40px) / 2 );}
}
@media screen and (max-width: 768px){
#item1{width: calc( 100% / 2 - 20px);}
#item2{width: calc( 100% / 2 - 20px);}
#item3{width: calc( 100% - 20px );}
#item4{width: calc( 100% / 4 - 20px);}
#item5{width: calc( 100% / 2 - 20px);}
#item6{width: calc( 100% / 4 - 20px);}
#item7{width: calc( 100% / 6 - 20px);}
#item8{width: calc( 100% / 6 - 20px);}
#item9{width: calc( 200% / 3 - 20px);}
#item10{width: calc( 100% / 4 - 20px);}
#item11{width: calc( 100% / 4 - 20px);}
}
</style>
</head>
<body>
<div class="container clearfix">
<div id="item1"></div>
<div id="item2"></div>
<div id="item3"></div>
<div id="item4"></div>
<div id="item5"></div>
<div id="item6"></div>
<div id="item7"></div>
<div id="item8"></div>
<div id="item9"></div>
<div id="item10"></div>
<div id="item11"></div>
</div>
</body>
</html>