94 lines
3.8 KiB
HTML
94 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
|
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
|
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<title>flexbox - tew-0x00</title>
|
|
<meta name="description" content="flexbox - tew-0x00">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<script defer src="/scripts/prism.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/css/style.css">
|
|
<link rel="stylesheet" type="text/css" href="/css/prism.css" data-noprefix/>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<div id="divlogoimg">
|
|
<img class="logoimg" src="/media/logo.png">
|
|
</div>
|
|
</header>
|
|
<h3 class="title">flexbox</h3>
|
|
<div id="divsection">
|
|
<p>CSS flexbox makes it easier to design responsive websites.</p>
|
|
<div id="divflexcontainer1">
|
|
<div class="divflexitem"><h3>1</h3></div>
|
|
<div class="divflexitem"><h3>2</h3></div>
|
|
<div class="divflexitem"><h3>3</h3></div>
|
|
<div class="divflexitem"><h3>4</h3></div>
|
|
<div class="divflexitem"><h3>5</h3></div>
|
|
<div class="divflexitem"><h3>6</h3></div>
|
|
<div class="divflexitem"><h3>7</h3></div>
|
|
</div>
|
|
<p>The div above uses flexbox layout and a directive to wrap its contents (flexbox-wrap: wrap).</p>
|
|
<div class="divcodeblock">
|
|
<pre><code class="language-css">#divflexcontainer1 {
|
|
display: flex;
|
|
justify-content: center;
|
|
flex-wrap: wrap;
|
|
margin: 3em 3em 1em;
|
|
padding: 1em;
|
|
border: solid .1em purple;
|
|
border-radius: 7px;
|
|
}</code></pre>
|
|
</div>
|
|
<div id="divflexcontainer2">
|
|
<div class="divflexitem"><h3>1</h3></div>
|
|
<div class="divflexitem"><h3>2</h3></div>
|
|
<div class="divflexitem"><h3>3</h3></div>
|
|
<div class="divflexitem"><h3>4</h3></div>
|
|
<div class="divflexitem"><h3>5</h3></div>
|
|
<div class="divflexitem"><h3>6</h3></div>
|
|
<div class="divflexitem"><h3>7</h3></div>
|
|
</div>
|
|
<p>This one has its items shrink in size (those that are <i>flex</i>ible) rather than wrap around. This is the default behaviour.</p>
|
|
<div class="divcodeblock">
|
|
<pre><code class="language-css">#divflexcontainer2 {
|
|
display: flex;
|
|
justify-content: center;
|
|
margin: 3em 3em 1em;
|
|
padding: 1em;
|
|
border: solid .1em green;
|
|
border-radius: 7px;
|
|
}</code></pre>
|
|
</div>
|
|
<div id="divflexcontainer3">
|
|
<div class="divflexitem"><h3>1</h3></div>
|
|
<div class="divflexitem"><h3>2</h3></div>
|
|
<div class="divflexitem"><h3>3</h3></div>
|
|
</div>
|
|
<p>flexbox using column layout - vertical alignment of elements.</p>
|
|
<div class="divcodeblock">
|
|
<pre><code class="language-css">#divflexcontainer3 {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flexbox-wrap: wrap;
|
|
justify-content: center;
|
|
align-content: center;
|
|
margin: 3em 3em 1em;
|
|
padding: 1em;
|
|
border: solid .1em yellow;
|
|
border-radius: 7px;
|
|
}</code></pre>
|
|
</div>
|
|
</div>
|
|
<footer class="copyright">
|
|
© 2020 <a href="https://git.dotya.ml/wanderer" target="_blank">wanderer</a>
|
|
· <a href="https://tew0x00.dotya.ml/">tew-0x00</a>
|
|
· WTFPL<br>
|
|
<a href="https://git.dotya.ml/wanderer/TEW-0x00" target="_blank" title="page source">source</a>
|
|
</footer>
|
|
</body>
|
|
</html>
|