.flex{ display:flex; flex-direction:column; width:600px; } .flex div{ width:100px; height:100px; background:red; margin-left:2px; } .flex div:nth-of-type(1){ align-self:flex-start; } .flex div:nth-of-type(2){ align-self:center; } .flex div:nth-of-type(3){ align-self:flex-end; }
转载于:https://www.cnblogs.com/chenchenhao/p/9889960.html