📝 代码查看
2
查看次数
2025-11-07
创建时间
2025-11-07
最后更新
<div class="g-container">
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
<div class="g-section">CSS Parallax</div>
</div>
body {
background: #000;
font-family: "lato", lucida grande, lucida sans unicode, lucida, helvetica, Hiragino Sans GB, Microsoft YaHei, WenQuanYi Micro Hei, sans-serif;
}
.g-container {
width: 100vw;
height: 100vh;
overflow-x: hidden;
overflow: scroll;
transform-style: preserve-3d;
perspective: 10px;
filter: blur(5px) contrast(5px);
}
.g-section {
position: absolute;
top: 0;
left: 0;
width: 100vw;
text-align: center;
line-height: 100vh;
padding: 50vh 0;
font-size: 15vh;
}
.g-section:nth-child(1) {
transform: translateZ(-1px) scale(1.1);
color: rgba(255, 170, 51, 0.8);
z-index: 1;
}
.g-section:nth-child(2) {
transform: translateZ(-2px) scale(1.2);
color: rgba(221, 255, 51, 0.8);
z-index: 2;
}
.g-section:nth-child(3) {
transform: translateZ(-3px) scale(1.3);
color: rgba(102, 255, 51, 0.8);
z-index: 3;
}
.g-section:nth-child(4) {
transform: translateZ(-4px) scale(1.4);
color: rgba(51, 255, 119, 0.8);
z-index: 4;
}
.g-section:nth-child(5) {
transform: translateZ(-5px) scale(1.5);
color: rgba(51, 255, 238, 0.8);
z-index: 5;
}
.g-section:nth-child(6) {
transform: translateZ(-6px) scale(1.6);
color: rgba(51, 153, 255, 0.8);
z-index: 6;
}
.g-section:nth-child(7) {
transform: translateZ(-7px) scale(1.7);
color: rgba(68, 51, 255, 0.8);
z-index: 7;
}
.g-section:nth-child(8) {
transform: translateZ(-8px) scale(1.8);
color: rgba(187, 51, 255, 0.8);
z-index: 8;
}
.g-section:nth-child(9) {
transform: translateZ(-9px) scale(1.9);
color: rgba(255, 51, 204, 0.8);
z-index: 9;
}
.g-section:nth-child(10) {
transform: translateZ(-10px) scale(2);
color: rgba(255, 51, 85, 0.8);
z-index: 10;
}
暂无JavaScript代码