小程序头像重叠效果

效果图

wxml:

<view class='cdtouxiang'>

    <view wx:for="{
   
   {images}}" wx:key="id"  style='transform:translateX({
   
   {-index*20}}rpx)'>

        <image  src='{
   
   {item}}' mode='aspectFill'></image>

    </view>

</view>

wxss:

  .cdtouxiang {

      width: 100%;

      height: auto;

      position: relative;

      display: flex;

      flex-direction:columnl;

      justify-content: flex-start;

      padding:0 10rpx;

      box-sizing: border-box;

    }

    .cdtouxiang  image {

      display: inline-block;

      width: 60rpx;

      height: 60rpx;

      border-style: solid;

      font-weight: bold;

      border-width: 1rpx;

      border-color: white;

      border-radius: 50%;

    }

猜你喜欢

转载自blog.csdn.net/m0_65465945/article/details/135915238