Responsive Web Design tutorial files
This commit is contained in:
@ -0,0 +1,72 @@
|
||||
html {
|
||||
background: black;
|
||||
color: white;
|
||||
font-family: sans-serif; }
|
||||
|
||||
body {
|
||||
margin: 0; }
|
||||
|
||||
h1, h2, h3, h4, h5, h6, p {
|
||||
margin: 0;
|
||||
line-height: 1.3; }
|
||||
|
||||
.container {
|
||||
padding: 24px; }
|
||||
|
||||
.header {
|
||||
background: blue; }
|
||||
|
||||
.wrapper {
|
||||
max-width: 1000px;
|
||||
margin-left: auto;
|
||||
margin-right: auto; }
|
||||
|
||||
.center {
|
||||
text-align: center; }
|
||||
|
||||
.grid {
|
||||
font-size: 0; }
|
||||
.grid .col {
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
display: inline-block;
|
||||
width: 100%; }
|
||||
.grid .col.half {
|
||||
width: 50%; }
|
||||
.grid .col.content-a, .grid .col.content-b, .grid .col.content-c, .grid .col.content-d {
|
||||
width: 25%;
|
||||
padding: 20px; }
|
||||
@media only screen and (max-width: 900px) {
|
||||
.grid .col.content-a, .grid .col.content-b, .grid .col.content-c, .grid .col.content-d {
|
||||
width: 50%; }
|
||||
.grid .col .button {
|
||||
text-align: center;
|
||||
display: block; } }
|
||||
@media only screen and (max-width: 600px) {
|
||||
.grid .col.content-a, .grid .col.content-b, .grid .col.content-c, .grid .col.content-d {
|
||||
width: 100%; }
|
||||
.grid .col .half {
|
||||
width: 100%; } }
|
||||
.grid .col.content-a {
|
||||
background: red; }
|
||||
.grid .col.content-b {
|
||||
background: green; }
|
||||
.grid .col.content-c {
|
||||
background: blue; }
|
||||
.grid .col.content-d {
|
||||
background: yellow; }
|
||||
|
||||
.button {
|
||||
border: 1px solid white;
|
||||
border-radius: 5px;
|
||||
padding: 20px;
|
||||
margin: 5px;
|
||||
display: inline-block; }
|
||||
|
||||
.left {
|
||||
text-align: left; }
|
||||
|
||||
.right {
|
||||
text-align: right; }
|
||||
|
||||
/*# sourceMappingURL=style.css.map */
|
||||
39
WebDevelopment/06-ResponsiveDesign/WebRoot/index.html
Normal file
39
WebDevelopment/06-ResponsiveDesign/WebRoot/index.html
Normal file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-GB">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Title</title>
|
||||
<link href="/Assets/Css/style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container header">
|
||||
<div class="wrapper">
|
||||
<div class="grid">
|
||||
<div class="col center">
|
||||
<h1>AngelSix</h1>
|
||||
<p>I develop software and hardware</p>
|
||||
|
||||
<div class="grid">
|
||||
<div class="col half right"><div class="button">Tell me more</div></div>
|
||||
<div class="col half left"><div class="button">Contact me</div></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="wrapper">
|
||||
<div class="grid center">
|
||||
<div class="col content-a">Content A</div>
|
||||
<div class="col content-b">Content B</div>
|
||||
<div class="col content-c">Content C</div>
|
||||
<div class="col content-d">Content D</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user