gsap自适应时尚海报视觉差异滚动效果代码
代码语言:html
所属分类:视觉差异
代码描述:gsap自适应时尚海报视觉差异滚动效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Cinzel&family=Noto+Sans&display=block" rel="stylesheet"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/normalize.5.0.css"> <style> :root { --dark: #242423; } html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } html, body { min-height: 100vh; } body { background-color: white; font-family: "Noto Sans", sans-serif; font-size: 14px; color: var(--dark); line-height: 1.3; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .logo, h1, h2 { margin: 0; line-height: 1; font-family: "Cinzel", serif; font-weight: 400; } p { margin: 0; } .stage { position: relative; background: white; visibility: hidden; } /* ========================================================================== Nav Header ========================================================================== */ .header { position: fixed; left: 40px; top: 24px; z-index: 100; display: flex; } @media all and (max-width: 768px) { .header { display: block; left: 24px; } } .logo { font-size: 27px; letter-spacing: -1px; } .nav-btn, .nav-btn__svg { width: 56px; height: 30px; } .nav-btn { display: block; margin: -2px 0 0 56px; } @media all and (max-width: 768px) { .nav-btn { margin: 18px 0 0 -6px; } } .nav-btn__svg { pointer-events: none; } /* ========================================================================== Intro ========================================================================== */ .intro, .footer { height: 100vh; } .intro { position: relative; padding: 5vw; background: #C0D7D8; overflow: hidden; } .intro__content { position: absolute; right: 8%; bottom: 15%; z-index: 3; } @media all and (max-width: 768px) { .intro__content { right: auto; } } .intro__title { font-size: 25vw; overflow: hidden; letter-spacing: -2.3vw; padding-right: 2.3vw; } @media all and (max-width: 768px) { .intro__title { margin-bottom: 5vh; } } .intro__img { position: absolute; width: 35%; max-width: 390px; height: auto; } @media all and (max-width: 768px) { .intro__img { width: 75vw; } } .intro__img--1 { z-index: 2; left: 10%; bottom: 35%; } @media all and (max-width: 768px) { .intro__img--1 { left: 50%; bottom: 50vh; } } .intro__img--2 { z-index: 1; left: 25%; bottom: 40%; } @media all and (max-width: 768px) { .intro__img--2 { left: 70%; bottom: 60vh; } } .intro__txt { max-width: 35vw; margin-left: 25vw; } @media all and (max-width: 768px) { .intro__txt { max-width: 80vw; margin-left: 5vw; } } /* ========================================================================== Slides ========================================================================== */ .slide { display: flex; align-items: stretch; height: 100vh; overflow: hidden; } .slide:nth-of-type(even) { background: #C4CDC4; } @media all and (max-width: 768px) { .slide { display: block; position: relative; } } /* Columns ========================================================================== */ .col { flex-basis: 50%; } @media all and (max-width: 768px) { .col { display: block; width: 100%; height: 100vh; } } .col--1 { position: relative; z-index: 1; } @media all and (max-width: 768px) { .col--1 { position: relative; z-index: 1; } } .col--2 { position: relative; overflow: hidden; } @media all and (max-width: 768px) { .col--2 { position: absolute; z-index: 0; left: 0; top: 0; } } /* ========================================================================== Column Content ========================================================================== */ .col__content { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; height: 100%; padding: 6vw 6vw 10vw; } @media all and (max-width: 768px) { .col__content { width: 80%; } } .col__content--1 { background: #D8C0C0; } @media all and (max-width: 768px) { .col__content--1 { background: rgba(216, 192, 192, 0.9); } } .col__content--2 { background: #CDD5E0; } @media all and (max-width: 768px) { .col__content--2 { background: rgba(205, 213, 224, 0.9); } } .col__content--3 { background: #F3D3B0; } @media all and (max-width: 768px) { .col__content--3 { background: rgba(243, 211, 176, 0.9); } } .col__content--4 { background: #F8E9E6; } @media all and (max-width: 768px) { .col__content--4 { background: rgba(248, 233, 230, 0.9); } } .col__content--5 { background: #D1E2EC; } @media all and (max-width: 768px) { .col__content--5 { background: rgba(209, 226, 236, 0..........完整代码请登录后点击上方下载按钮下载查看
网友评论0