<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Align-self</title>
</head>
<body>
<div class="container">
<div style="align-self: center">1</div>
<div style="align-self: flex-start">2</div>
<div style="align-self: flex-end">3</div>
<div>4</div>
</body>
</html>
.container{
display: flex;
height: 200px;
border: 1px solid #808080;
align-self: flex-end;
}
.container > div {
background-color: DodgerBlue;
color: white;
width: 100px;
margin: 10px;
text-align: center;
line-height: 75px;
font-size: 30px;
.item {
border: 1px solid #1d1d1d;
background-color: #23C4ED;
width: 50px;
height: 50px;
margin: 7px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.