外部相对定位relative,内部绝对定位,不使用浮动。但是得使用 z-index
<view class="div_img">
<view class="left_icon">
xxx
</view>
<image src="../../static/image/news_two.png" mode="aspectFit"></image>
</view>
.div_img{
position: relative;
z-index: 5;
width: 750rpx;
height: 320rpx;
}
.div_img>image{
position: relative;
width: 750rpx;
height: 320rpx;
}
.left_icon{
position: absolute;
z-index: 10;
width: 207rpx;
height: 43rpx;
background-color: green;
}