「已注销」 2023-03-13 10:43 采纳率: 75%
浏览 65
已结题

css怎么把文字放图片左下角

css怎么把文字放图片左下角?如图这样


<view class="shop-bug">
                    <image class="shop-img" src="../../static/tab/img.jpg"></image>
                    <p class="dynamicText">{{item.dynamicText}}

</view> .shop-bug { position: relative; } .dynamicText { position: absolute; top: 0; } .shop-img { width: 90%; height: 200px; border-radius: 20px; background-color: #2cb6fe; margin-left: 5%; margin-top: 20px }

img

  • 写回答

3条回答 默认 最新

  • 凉城┓.〆 2023-03-13 10:59
    关注
    .dynamicText {
      position: absolute;
      bottom: 0;
      left: 0;
      z-index: 2; //有需要的话可以设置
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 3月22日
  • 已采纳回答 3月14日
  • 创建了问题 3月13日