传播星球
传播星球
  • 发布:2024-06-18 14:17
  • 更新:2024-06-18 15:06
  • 阅读:30

nvue display: flex;没起作用

分类:nvue

代码:
<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; /
}

为啥盒子还是垂直排列而不是从左向右啊

2024-06-18 14:17 负责人:无 分享
已邀请:
爱豆豆

爱豆豆 - 办法总比困难多

默认就是垂直的
你可以使用flex-direction: row;改变方向为横向排列
参考文档:https://uniapp.dcloud.net.cn/tutorial/nvue-css.html

要回复问题请先登录注册