<!doctype html>
<html>
<head>
<style type="text/css">
#main{
border: 1px solid black;
width: 450px;
height: 300px;
display: flex;
align-items:center;
}
#div1{
width: 70px;
height: 70px;
background-color: pink;
align-self:auto;
}
#div2{
width: 70px;
height: 70px;
background-color: red;
align-self:flex-start;
}
#div3{
width: 70px;
height: 70px;
background-color: green;
align-self:flex-end;
}
#div4{
width: 70px;
height: 70px;
background-color: yellow;
align-self:center;
}
#div5{
width: 70px;
height: 70px;
background-color: gray;
align-self:baseline;
}
#div6{
width: 70px;
height: 70px;
background-color: purple;
align-self:stretch;
}
</style>
</head>
<body>
<div id="main">
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
<div id="div4"></div>
<div id="div5"></div>
<div id="div6"></div>
</div>
</body>
</html>
align-self can decide the style of specific item.If auto,inherits the parent element’s align-items value.