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;
		}
	}
}
相关推荐
云知谷34 分钟前
【C++基本功】C++适合做什么,哪些领域适合哪些领域不适合?
c语言·开发语言·c++·人工智能·团队开发
键盘不能没有CV键34 分钟前
【图片处理】✈️HTML转图片字体异常处理
前端·javascript·html
l1t1 小时前
DeepSeek辅助利用搬移底层xml实现快速编辑xlsx文件的python程序
xml·开发语言·python·xlsx
你的人类朋友3 小时前
【Node】认识multer库
前端·javascript·后端
C_Liu_3 小时前
C++:list
开发语言·c++
my rainy days3 小时前
C++:友元
开发语言·c++·算法
小梁努力敲代码3 小时前
java数据结构--List的介绍
java·开发语言·数据结构
云知谷4 小时前
【HTML】网络数据是如何渲染成HTML网页页面显示的
开发语言·网络·计算机网络·html
可触的未来,发芽的智生4 小时前
新奇特:黑猫警长的纳米世界,忆阻器与神经网络的智慧
javascript·人工智能·python·神经网络·架构