父元素设置了 flex 布局

display: flex;
align-items: center;

如何让某个子元素靠右呢?

方法一:

flex: 1;
text-align: right;

方法二:

margin-left: auto;

 

相关文章: