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;
		}
	}
}
相关推荐
未知原色几秒前
react实现虚拟键盘支持Ant design Input和普通input Dom元素-升级篇
前端·javascript·react.js·node.js·计算机外设
想不明白的过度思考者4 分钟前
Java网络聊天室——OverThinker-ChatRoom
java·开发语言·网络
过期动态6 分钟前
JDBC进阶篇:拓展功能与连接池运用详解
java·开发语言·数据库·mysql·oracle·intellij-idea·mybatis
布伦鸽7 分钟前
C# WPF -MaterialDesignTheme 找不到资源“xxx“问题记录
开发语言·c#·wpf
枫叶丹48 分钟前
【Qt开发】Qt窗口(十) -> QInputDialog 输入对话框
c语言·开发语言·数据库·c++·qt
杰瑞不懂代码9 分钟前
基于 MATLAB 的 BPSK 在 AWGN 信道下误码率仿真与性能分析
开发语言·网络·matlab
zore_c9 分钟前
【C语言】EasyX图形库——实现游戏音效(详解)(要游戏音效的看过来!!!)
c语言·开发语言·经验分享·笔记·游戏
qq_3814549911 分钟前
设计模式详解:代码架构的艺术
开发语言·javascript·ecmascript
半桶水专家12 分钟前
vue3中v-model 用法详解
前端·javascript·vue.js
行走的陀螺仪12 分钟前
Vue3 项目单元测试全指南:价值、Vitest 落地与提效方案
开发语言·前端·单元测试·html5·vitest