美文网首页
小程序拼团头像重叠效果

小程序拼团头像重叠效果

作者: 易水寒兮风潇潇 | 来源:发表于2020-05-15 15:14 被阅读0次

头像加了白色原边,主要用transform:translateX动态偏移实现

<!-- 重叠头像 -->

<view class='cdtouxiang'>

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

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

</view>

</view>

   .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%;

    }

相关文章

网友评论

      本文标题:小程序拼团头像重叠效果

      本文链接:https://www.haomeiwen.com/subject/brmcohtx.html