rellax实现全屏图文视觉差异滚动效果代码
代码语言:html
所属分类:视觉差异
代码描述:rellax实现全屏图文视觉差异滚动效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
/* Flexbox */
/* Columns */
/* Spacings */
/* Colors */
/* Sizes */
/* misc */
/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;0,6..96,800;0,6..96,900;1,6..96,400;1,6..96,500;1,6..96,600;1,6..96,700;1,6..96,800;1,6..96,900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;0,6..96,800;0,6..96,900;1,6..96,400;1,6..96,500;1,6..96,600;1,6..96,700;1,6..96,800;1,6..96,900&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400;0,6..96,500;0,6..96,600;0,6..96,700;0,6..96,800;0,6..96,900;1,6..96,400;1,6..96,500;1,6..96,600;1,6..96,700;1,6..96,800;1,6..96,900&family=Noto+Serif+Display:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
*,
*::before,
*::after {
box-sizing: inherit;
}
html,
body {
margin: 0;
width: 100%;
color: black;
font-family: "Poppins", sans-serif;
background-color: #fbf4f4;
-webkit-font-smoothing: antialiased;
scroll-behavior: smooth;
box-sizing: border-box;
}
/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
}
/* Font Size */
h1 {
font-size: clamp(2.8rem, 2.2399999999999998rem + 2.8vw, 5.6rem);
}
h2 {
font-size: clamp(2rem, 1.68rem + 1.6vw, 3.6rem);
}
h3 {
font-size: clamp(1.8rem, 1.68rem + 0.59vw, 2.4rem);
}
h4 {
font-size: calc($heading-small - 0.2rem);
}
h5 {
font-size: calc($heading-small - 0.4rem);
}
h6 {
font-size: calc($heading-small - 0.6rem);
}
/* Font Weight */
h1,
h2 {
font-weight: 900;
}
h3,
h4,
h5,
h6 {
font-weight: 800;
}
/* Paragraphs */
p {
margin: 0;
font-size: clamp(1rem, 0.978rem + 0.11vw, 1.11rem);
}
/* Links */
a {
color: #f01932;
font-size: clamp(1rem, 0.978rem + 0.11vw, 1.11rem);
text-decoration: none;
}
a:visited {
color: rgba(240, 25, 50, 0.5);
}
/* Global */
.view-width {
width: calc(100% - 6em);
max-width: 1420px;
}
.no-margin {
margin: 0 !important;
}
/* Main */
.main {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
}
/* Article List */
.article-list {
width: 100%;
}
.article-list-item {
margin: 0;
padding: 0;
width: 100%;
height: 100vh;
position: relative;
animation: aListLoading 1s 0.5s cubic-bezier(0.175, 0.685, 0.32, 1) forwards;
display: flex;
justify-content: center;
align-items: center;
}
.article-list-item-inner {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
z-index: 3;
display: flex;
justify-content: center;
align-items: center;
}
.article-list-item-inner-title {
width: 100%;
height: 100%;
position: absolute;
z-index: 5;
display: flex;
justify-content: center;
align-items: center;
}
.article-list-item-inner-title-inner {
padding: 0.22em 0;
position: relative;
color: white;
font-family: "Noto Serif Display", serif;
font-size: clamp(2.8rem, 2.2399999999999998rem + 2.8vw, 5.6rem);
font-weight: 900;
font-style: italic;
te.........完整代码请登录后点击上方下载按钮下载查看
网友评论0