gsap实现信息图表落地页代码
代码语言:html
所属分类:布局界面
代码描述:gsap实现信息图表落地页代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
:root {
--bg-1: #f5f4f2;
--bg-2: #e8e6e2;
--ink: #0a0a0c;
--ink-soft: #2a2a2d;
--mute: #8a8780;
--line: #c8c5bd;
--tile: #0e0e11;
--tile-2: #1a1a1e;
--accent: #f46a6a;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
background: var(--bg-1);
color: var(--ink);
font-family: "Inter", system-ui, sans-serif;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
body {
background: radial-gradient(
120% 70% at 50% 0%,
#f8f7f4 0%,
#efede7 60%,
#e2dfd7 100%
);
min-height: 100vh;
}
/* Subtle grain */
.grain {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 100;
opacity: 0.05;
mix-blend-mode: multiply;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
/* ============ POSTER (HERO) ============ */
.poster {
min-height: 100vh;
padding: 48px 32px 72px;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
z-index: 5;
}
.credit {
font-size: 11px;
letter-spacing: 0.36em;
color: var(--mute);
font-weight: 500;
margin-bottom: 36px;
}
/* ----- The hub-and-spoke diagram ----- */
.diagram {
position: relative;
width: 100%;
max-width: 820px;
aspect-ratio: 1.6 / 1;
margin: 12px 0 56px;
}
.diagram svg.bg {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
overflow: visible;
}
.ring {
fill: rgba(60, 60, 64, 0.04);
stroke: rgba(60, 60, 64, 0.06);
stroke-width: 1;
}
.link {
fill: none;
stroke: rgba(20, 20, 22, 0.55);
stroke-width: 1.2;
stroke-linecap: round;
stroke-dasharray: 600;
stroke-dashoffset: 600;
}
/* Brain at center */
.brain {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: 84px;
line-height: 1;
z-index: 5;
filter: drop-shadow(0 14px 22px rgba(180, 60, 80, 0.35))
drop-shadow(0 4px 6px rgba(40, 10, 20, 0.25));
user-select: none;
cursor: pointer;
will-change: transform;
}
/* Icon tiles */
.icon-tile {
position: absolute;
width: 70px;
height: 70px;
border-radius: 18px;
background: var(--tile);
display: flex;
align-items: center;
justify-content: center;
color: #fafaf7;
box-shadow: 0 24px 40px -16px rgba(0, 0, 0, 0.5),
0 10px 20px -6px rgba(0, 0, 0, 0.32), 0 3px 6px -1px rgba(0, 0, 0, 0.18),
inset 0 2px 0 rgba(255, 255, 255, 0.12), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
cursor: pointer;
z-index: 10;
transition: box-shadow 0.5s cubic-bezier(0.6, 0, 0.2, 1);
will-change: transform;
}
.icon-tile::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(
155deg,
rgba(255, 255, 255, 0.12) 0%,
transparent 35%,
transparent 70%,
rgba(0, 0, 0, 0.3) 100%
);
pointer-events: none;
border-radius: inherit;
}
.icon-tile:hover {
box-shadow: 0 32px 50px -16px rgba(0, 0, 0, 0.6),
0 14px 26px -6px rgba(0, 0, 0, 0.38), 0 4px 8px -1px rgba(0, 0, 0, 0.2),
inset 0 2px 0 rgba(255, 255, 255, 0.15), inset 0 -3px 6px rgba(0, 0, 0, 0.5);
}
.icon-tile svg {
width: 32px;
height: 32px;
display: block;
}
/* Positions */
.tile-1 {
left: 12%;
top: 8%;
} /* top-left K */
.tile-2 {
right: 12%;
top: 8%;
} /* top-right smiley */
.tile-3 {
left: 4%;
top: 46%;
} /* mid-left Ø */
.tile-4 {
right: 4%;
top: 46%;
} /* mid-right Rytr */
.tile-5 {
left: 12%;
bottom: 8%;
} /* bott.........完整代码请登录后点击上方下载按钮下载查看















网友评论0