-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8375e81
commit f33ed4d
Showing
3 changed files
with
243 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head lang="en"> | ||
<meta charset="UTF-8"> | ||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=true" name="viewport"> | ||
<title></title> | ||
<link rel="stylesheet" href="../base.css"> | ||
<style> | ||
main { | ||
/* A quirk of floats is that odd things happen if you don't float the container as well. */ | ||
float: left; | ||
width: 100%; | ||
margin-bottom: 40px; | ||
} | ||
.grid { | ||
padding: 20px 0 0 20px; | ||
list-style: none; | ||
font-size: 32px; | ||
} | ||
.grid li { | ||
float: left; | ||
width: 50%; | ||
padding: 0 20px 20px 0; | ||
} | ||
.grid div { | ||
background: rgba(0,0,0,.4); | ||
padding: 40px 20px; | ||
text-align: center; | ||
} | ||
|
||
@media screen and (min-width: 600px) { | ||
.grid li { | ||
width: 33.333%; | ||
} | ||
} | ||
|
||
@media screen and (min-width: 900px) { | ||
.grid li { | ||
width: 25%; | ||
} | ||
} | ||
|
||
@media screen and (min-width: 1200px) { | ||
.grid li { | ||
width: 16.666%; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="example"> | ||
<main> | ||
<ul class="grid"> | ||
<li> | ||
<div> | ||
1 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
2 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
3 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
4 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
5 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
6 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
7 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
8 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
9 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
10 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
11 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
12 | ||
</div> | ||
</li> | ||
</ul> | ||
</main> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head lang="en"> | ||
<meta charset="UTF-8"> | ||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=true" name="viewport"> | ||
<title></title> | ||
<link rel="stylesheet" href="../base.css"> | ||
<style> | ||
main { | ||
/* A quirk of floats is that odd things happen if you don't float the container as well. */ | ||
float: left; | ||
width: 100%; | ||
margin-bottom: 40px; | ||
} | ||
.grid { | ||
padding: 20px 0 0 20px; | ||
list-style: none; | ||
font-size: 32px; | ||
} | ||
.grid li { | ||
float: left; | ||
width: 200px; | ||
padding: 0 20px 20px 0; | ||
} | ||
.grid div { | ||
background: rgba(0,0,0,.4); | ||
padding: 40px 20px; | ||
text-align: center; | ||
} | ||
|
||
@media screen and (min-width: 900px) { | ||
.grid li { | ||
width: 25%; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="example"> | ||
<main> | ||
<ul class="grid"> | ||
<li> | ||
<div> | ||
1 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
2 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
3 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
4 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
5 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
6 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
7 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
8 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
9 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
10 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
11 | ||
</div> | ||
</li> | ||
<li> | ||
<div> | ||
12 | ||
</div> | ||
</li> | ||
</ul> | ||
</main> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters