提现记录展示
.withdrawal-container {
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
padding: 20px;
max-width: 400px;
margin: 0 auto;
font-family: Arial, sans-serif;
}
.title {
text-align: center;
color: #333;
margin-bottom: 20px;
font-size: 20px;
font-weight: bold;
}
.record-list {
list-style: none;
padding: 0;
margin: 0;
height: 150px;
overflow: hidden;
position: relative;
}
.record-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
border-bottom: 1px solid #eee;
}
.record-name {
font-size: 15px;
color: #333;
}
.record-amount {
font-size: 16px;
font-weight: bold;
color: #ff4d4f;
}
.scrolling-content {
animation: scrollUp 20s linear infinite;
}
@keyframes scrollUp {
0% {
transform: translateY(0);
}
100% {
transform: translateY(-75%);
}
}
// 预定义的20条提现记录数据
const withdrawalRecords = [
{ name: "张*强", amount: 500 },
{ name: "李*明", amount: 300 },
{ name: "王*芳", amount: 800 },
{ name: "刘*伟", amount: 200 },
{ name: "陈*杰", amount: 450 },
{ name: "杨*丽", amount: 600 },
{ name: "赵*涛", amount: 350 },
{ name: "黄*敏", amount: 700 },
{ name: "周*艳", amount: 250 },
{ name: "吴*静", amount: 900 },
{ name: "孙*军", amount: 400 },
{ name: "朱*磊", amount: 550 },
{ name: "胡*洋", amount: 650 },
{ name: "林*勇", amount: 750 },
{ name: "郑*超", amount: 850 },
{ name: "梁*娜", amount: 950 },
{ name: "谢*娟", amount: 150 },
{ name: "宋*秀", amount: 100 },
{ name: "唐*兰", amount: 50 },
{ name: "许*霞", amount: 1000 }
];
// 渲染记录列表
function renderRecords() {
const container = document.getElementById('recordsContent');
let html = '';
// 创建3条固定显示的记录
for (let i = 0; i < 3; i++) {
const record = withdrawalRecords[i];
html += `
${record.name}
¥${record.amount}
`;
}
// 添加所有记录以实现循环滚动效果
withdrawalRecords.forEach(record => {
html += `
${record.name}
¥${record.amount}
`;
});
container.innerHTML = html;
}
// 页面加载时初始化
document.addEventListener('DOMContentLoaded', renderRecords);