<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=">
<style>
.flex-container {
display: flex;
height: 10em;
border: 4px solid #4c4c4c;
}
.flex-item {
padding: 2em;
background: #a37eba;
color: #fff;
margin: 0.25em;
}
.stretch {
align-self: stretch;
}
.flex-start {
align-self: flex-start;
}
.flex-end {
align-self: flex-end;
}
.center {
align-self: center;
}
.baseline {
align-self: baseline;
}
body {
font-family: sans-serif;
font-size: 20px;
}
</style>
<title>Align-Self</title>
</head>
<body>
<div class="flex-container">
<div class="flex-item stretch">stretch</div>
<div class="flex-item flex-start">flex-start</div>
<div class="flex-item flex-end">flex-end</div>
<div class="flex-item center">center</div>
<div class="flex-item baseline">baseline</div>
</div>
</body>
</html>