代码:
<div class="postBarTwo_head">
<div class="postBarTwo_head_left">
<image class="postBarTwo_head_left_image" :src="url" mode=""></image>
</div>
<div class="postBarTwo_head_text"></div>
<div class="postBarTwo_head_right"></div>
</div>
.postBarTwo_head{
width: 750rpx;
height: 88rpx;
background-color: aqua;
display: flex;
/ align-items: center; /
}
为啥盒子还是垂直排列而不是从左向右啊
1 个回复
爱豆豆 - 办法总比困难多
默认就是垂直的
你可以使用flex-direction: row;改变方向为横向排列
参考文档:https://uniapp.dcloud.net.cn/tutorial/nvue-css.html