Created
August 28, 2016 05:33
-
-
Save k1r8r0wn/9589e70e79553698d0ff17cac3a262f4 to your computer and use it in GitHub Desktop.
Best practices of css
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="initial-scale=1"> | |
<title></title> | |
<style type="text/css" media="screen"> | |
body { | |
font-size: calc(1em + .5vw); | |
} | |
/* body * + * { | |
margin-top: 1.5rem; | |
} */ | |
.text-centered { | |
text-align: center; | |
} | |
.grid { | |
display: flex; | |
flex-flow: row wrap; | |
} | |
.grid > * { | |
flex-basis: 10em; | |
flex-grow: 1; | |
border: 1px solid black; | |
} | |
</style> | |
<link rel="stylesheet" href=""> | |
</head> | |
<body> | |
<div class="text-centered"> | |
<h1>Hello world!</h1> | |
<h2>Hello world!</h2> | |
<h3>Hello world!</h3> | |
<h4>Hello world!</h4> | |
<p>Hello world!</p> | |
</div> | |
<div class="grid text-centered"> | |
<p>Hello!</p> | |
<p>Hello!</p> | |
<p>Hello!</p> | |
<p>Hello!</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment