ios:显示的文字内容会少一截(不同宽度的情况都出现了) android无此问题.
<map class=‘map’>
<cover-view class=‘test-wrap’>
<cover-view class=‘flex’>
<cover-view class=‘flex-left’>test</cover-view>
<cover-view class=‘flex-right’>测试文字测试文字测试文字测试文字测试文字</cover-view>
</cover-view>
<cover-view class=‘flex’>
<cover-view class=‘flex-left’>test</cover-view>
<cover-view class=‘flex-right’>测试文字——测试文字——测试文字</cover-view>
</cover-view>
<cover-view class=‘flex’>
<cover-view class=‘flex-left’>test</cover-view>
<cover-view class=‘flex-right’>测试文字——测试文字</cover-view>
</cover-view>
<cover-view class=‘flex’>
<cover-view class=‘flex-left’>test</cover-view>
<cover-view class=‘flex-right’>测试文字</cover-view>
</cover-view>
</cover-view>
</map>
.map{
height: 100%;
width: 750rpx;
position: relative;
}
.test-wrap{
position: absolute;
top: 50%;
left: 0;
width: 750rpx;
background-color: rgba(27, 27, 27, 0.8);
color: #fff;
text-align: center;
}
.flex{
display: flex;
justify-content: center;
}
.flex-right{
background-color: red;
}