js+css实现工具排行版数据动态展现动画效果代码
代码语言:html
所属分类:其他
代码描述:js+css实现工具排行版数据动态展现动画效果代码,可导出图片
代码标签: js css 工具 排行版 数据 动态 展现 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>高端工具排行榜</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Microsoft YaHei', Arial, sans-serif;
}
body {
width: 100%;
height: 100vh;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.container {
width: 100%;
max-width: 540px; /* 9:16 比例的容器 */
height: 100vh;
max-height: 960px;
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
border-radius: 12px;
overflow: hidden;
position: relative;
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}
.header {
padding: 30px 20px;
background: linear-gradient(45deg, #0f3443, #34e89e);
text-align: center;
position: relative;
overflow: hidden;
}
.header::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
transform: translateX(-100%);
animation: shimmer 2s infinite;
}
@keyframes shimmer {
100% {
transform: translateX(100%);
}
}
.header h1 {
color: #fff;
font-size: 32px;
font-weight: 800;
margin-bottom: 10px;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
letter-spacing: 1px;
}
.header p {
color: rgba(255, 255, 255, 0.85);
font-size: 16px;
}
.content {
padding: 20px;
height: calc(100% - 160px);
overflow-y: auto;
position: relative;
}
.item {
background: rgba(255, 255, 255, 0.05);
border-radius: 12px;
margin-bottom: 20px;
padding: 20px;
display: flex;
align-items: center;
position: relative;
transition: all 0.5s ease;
transform: translateY(30px);
opacity: 0;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.item.active {
transform: translateY(0);
opacity: 1;
}
.item-number {
position: absolute;
top: -10px;
left: -10px;
width: 40px;
height: 40px;
background: linear-gradient(135deg, #ff7b00, #ff006a);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-weight: bold;
font-size: 18px;
box-shadow: 0 5px 15px rgba(255, 0, 106, 0.3);
z-index: 2;
}
.top3 {
background: linear-gradient(135deg, #FFD700, #FFA500);
box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}
.item-icon {
width: 60px;
height: 60px;
background: rgba(255, 255, 255, 0.1);
border-radius: 12px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 20px;
font-size: 28px;
color: #fff;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
flex-shrink: 0;
}
.item-info {
flex: 1;
}
.item-name {
color: #fff;
font-size: 18px;
font-weight: bold;
margin-bottom: 6px;
}
.item-desc {
color: rgba(255, 255, 255, 0.7);
font-size: 14px;
line-height: 1.4;
}
.item-score {
background: linear-gradient(45deg, #3498db, #2ecc71);
color: white;
padding: 8px 12px;
border-radius: 20px;
font-weight: bold;
margin-left: 10px;
font-size: 16px;
box-shadow: 0 5px 15px rgba(46, 204, 113, 0.2);
}
.footer {
padding: 20px;
text-align: center;
background: rgba(0, 0, 0, 0.2);
color: rgba(255, 255, 255, 0.7);
font-size: 14px;
position: absolute;
bottom: 0;
width: 100%;
}
.controls {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 15px;
}
.btn {
background: linear-gradient(45deg, #3498db, #2ecc71);
color: #fff;
border: none;
padding: 10px 20px;
border-radius: 30px;
cursor: pointer;
font-weight: bold;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
}
.btn:hover {
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.btn:active {
transform: translateY(0);
}
.particles {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: -1;
}
/* 自定义滚动条 */
.content::-webkit-scrollbar {
width: 6px;
}
.content::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0