hi,我系STANROO
你用过flex-flow吗?
常规实现垂直布局,我会设置flex-direction: column;flex-direction属性决定主轴的方向(即项目的排列方向),通常默认值是flex-direction: row;flex-wrap又会控制项目是否都排在一条线(又称"轴线")上,通常默认值是flex-direction: nowrap,如果想要排不下的时候自动换行,可以设置flex-direction: wrap。
设置以下样式即可实现vertical状态下也就是的步骤条垂直布局
{
display: flex
flex-direction: column;
flex-direction: nowrap;
}
但调试发现,element源码中使用了flex-flow: column,而未flex-direction: nowrap和flex-direction: column。后来查阅资料发现,flex-flow: column属性将flex-direction: nowrap固定,由值控制按column排列,还是按row排列。
上截图:
.el-steps样式描述了一个flexbox,el-step--vertical又实现了垂直布局。
: 还有一些flex-shrink、flex-grow、flex-basis 使用时的疑问,下次再来记录一下