欧美日韩国产一区,亚洲一区视频,色综合久久久久,私密按摩师舌头伸进去了,99re6这里只有精品,夜夜性日日交xxx性hd

小程序image組件中居中問題

  • • 發表于 8年前
  • • 作者 十方
  • • 9598 人瀏覽
  • • 3 條評論
  • • 最后編輯時間 8年前
  • • 來自 [問 答]

原創聲明:本文為作者原創,未經允許不得轉載,經授權轉載需注明作者和出處

image組件中鑲嵌在view組件中如何實現image組件水平居中
代碼如下:
wxml如下:

<view class="infoLeft">
            <view class="leftTop">Content</view>
            <view class="leftBottom">
                <text>測試</text>
                <view class="leftBottomIn">
                    <image src="../images/cs/3037.png"  mode="aspectFit" ></image>
                </view>
            </view>
        </view>

wxss如下:

.infoLeft{
  width: 374rpx;
  background-color: #faf7f7;
  border-right: 2rpx solid white;
  border-bottom: 2rpx solid white;
  }
.leftTop{
  width: 100%;
  height: 80rpx;
  background-color: slategray;
}
.leftBottom{
  display: flex;
  flex-direction: row;
  width: 100%;
  align-items: center;
}
.leftBottom text{
  width: 50%;
  padding-left:10rpx;
  background-color: goldenrod;
}
.leftBottom .leftBottomIn{
  width: 50%;
  align-items: center;
}
.leftBottomIn image{
  width: 80%;
  /*margin-left:5%;*/
  /*background-color: greenyellow;*/
}

效果如下:

`

分享到:
3條評論
Ctrl+Enter
作者

十方

十方

APP:1 帖子:4 回復:46 積分:97

已加入社區[3115]天

主人太懶,簽名沒設置!

作者詳情》
Top