想要达到的效果:
目前效果:
代码和样式如下:
如果把rightTitle的flex-direction设成row-reverse,右边部分靠右了,但是里面的字体会颠倒,请问有什么解决办法?
1、在左view和右view之间加一个view,flex:1即可。
.propertyBox{ display: flex; flex-wrap: nowrap; align-items: center; } .leftTitle{ flex:1; }
.propertyBox{ display: flex; justify-content: space-between; align-items: center; }
box样式
display: flex;
align-items: center;
justify-content: space-between;
.propertyBox {justify-content: space-between;}