flextest04.html 1.72 KB
Newer Older
aline's avatar
aline committed
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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
<!DOCTYPE HTML>
<html lang="fr">
<head>
	<meta charset="UTF-8">

    <link rel="stylesheet" href="../css/style.css" />
    <link rel="stylesheet" href="../node_modules/highlight.js/styles/github.css" />

	<style type="text/css">
		.parent {
			display: flex;
			justify-content: flex-start;
		}
		.parent:nth-of-type(2) {
			-webkit-justify-content: flex-end;
			justify-content: flex-end;
		}
		.parent:nth-of-type(3) {
			-webkit-justify-content: center;
			justify-content: center;
		}
		.parent:nth-of-type(4) {
			-webkit-justify-content: space-between;
			justify-content: space-between;
		}
		.parent:nth-of-type(5) {
			-webkit-justify-content: space-around;
			justify-content: space-around;
		}

	</style>
	<title>Mise en page CSS avec Flexbox</title>
</head>
<body>
	<h1>Mise en page CSS avec Flexbox</h1>
	<h2>4 : justify-content</h2>

	<h3>4.1 : flex-start</h3>
    <ul class="parent">
		<li>Element 1</li>
		<li>Element 2</li>
		<li>Element 3</li>
		<li>Element 4</li>
		<li>Element 5</li>
	</ul>

	<h3>4.2 : flex-end</h3>
    <ul class="parent">
		<li>Element 1</li>
		<li>Element 2</li>
		<li>Element 3</li>
		<li>Element 4</li>
		<li>Element 5</li>
	</ul>

	<h3>4.3 : center</h3>
    <ul class="parent">
		<li>Element 1</li>
		<li>Element 2</li>
		<li>Element 3</li>
		<li>Element 4</li>
		<li>Element 5</li>
	</ul>

	<h3>4.4 : space-between</h3>
    <ul class="parent">
		<li>Element 1</li>
		<li>Element 2</li>
		<li>Element 3</li>
		<li>Element 4</li>
		<li>Element 5</li>
	</ul>

	<h3> 4.5 space-around</h3>
    <ul class="parent">
		<li>Element 1</li>
		<li>Element 2</li>
		<li>Element 3</li>
		<li>Element 4</li>
		<li>Element 5</li>
	</ul>

</body>
</html>