根据您提供的代码,图片覆盖了view的背景颜色并改变为view背景色覆盖图片的原因是,您将图片放在了view的前面,覆盖了view的背景颜色。如果您希望view的背景色覆盖图片,可以将图片放在view的后面。

修改后的代码如下所示:

<view style="height: 211px;">
  <view style="padding: 16px;border-radius: 8px;background-color: lemonchiffon;margin-top: -10px;">
    <label style="font-weight: 700;font-size: 18px;color: #000;">长月烬明</label>
    <u-divider></u-divider>
    <view style="text-align: center;">
      <label class="text" style=" float: left;color: #f10;">¥600</label>
      <label class="text">神话书刊</label>
      <label style="float: right;">自营</label>
    </view>
  </view>
  <image src="../../static/bookdemo.png" style="width: 100%;height: 211px;"></image>
</view>

在修改后的代码中,我将图片放在了view的后面,这样view的背景色就会覆盖图片

你好 请帮我查看 为什么图片覆盖了view的背景颜色 并改变为view背景色覆盖图片 代码如下view style=height 211px; image src=staticbookdemopng style=width 100;height 211px;image view view style=padding 16px;border-radius 8px;backgro

原文地址: http://www.cveoy.top/t/topic/i0UC 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录