uni-app头像叠加显示

展示

代码

html 复制代码
<view class="bmBox">
	<view class="bmLeft">
		已报名:<text class="blueColor">10人</text>
	</view>
	<view class="bmRight dflex">
		<view class="avatarList">
			<image src="/static/images/logo.png" mode="aspectFill" v-for="(item, index) in 8" :key="index"
				class="stack-item" :class="{'hide': index >= 5}">
			</image>
		</view>
		<image src="/subActivity/static/images/more.png" mode="aspectFill" class="moreImg"></image>
	</view>
</view>
css 复制代码
.bmBox {
	border-top: 12rpx solid #F7F7F7;
	border-bottom: 12rpx solid #F7F7F7;
	padding: 10rpx 30rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;

	.bmLeft {
		color: #333333;
		font-size: 28rpx;
		font-weight: 700;
		flex-shrink: 0;

		.blueColor {
			color: #276cf5;
		}
	}

	.bmRight {
		.avatarList {
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: center;
			margin-right: -5px;

			.stack-item {
				width: 48rpx;
				height: 48rpx;
				border: 1px soild #ffffff;
				border-radius: 50%;
				margin: 10px;
				position: relative;
				z-index: 1;
			}

			.stack-item {
				margin-left: -35rpx;
			}

			.hide {
				display: none;
				/* 隐藏元素 */
			}
		}

		.moreImg {
			width: 44rpx;
			height: 44rpx;
		}
	}
}
相关推荐
云小逸1 分钟前
C++ 第一阶段:对象、内存与生命周期
开发语言·c++
玖玥拾16 分钟前
Lua 基础语法(二)
开发语言·unity·lua
王的宝库20 分钟前
GO常用标准库包
开发语言·后端·golang
geovindu36 分钟前
python: Face Recognition
开发语言·后端·python·人脸识别
三十而立洋42 分钟前
JavaScript 原型链:一张图讲透「对象继承」的底层真相
前端·javascript
平头哥技术团队1 小时前
Day 13 | 调 line-height 和 margin:三处间距让名片页脱离模板感
开发语言·前端·javascript·学习·html5
黑马程序员毕设1 小时前
基于Java的仪器管理系统设计与实现
java·开发语言·spring boot·后端·微信小程序
平头哥AI1 小时前
Day 13 | 一个函数回两个值:Go 的 error 是从哪冒出来的
开发语言·后端·golang
asdzx671 小时前
Python 实现 PDF 文本查找与高亮标注
开发语言·python·pdf
zander2582 小时前
LeetCode 1143. 最长公共子序列
开发语言·python·算法