gsap+ScrollTrigger实现全屏上下视觉差异滚动幻灯片效果代码

代码语言:html

所属分类:幻灯片

代码描述:gsap+ScrollTrigger实现全屏上下视觉差异滚动幻灯片效果代码

代码标签: gsap ScrollTrigger 全屏 上下 视觉 差异 滚动 幻灯片

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
* {
  margin: 0;
  box-sizing: border-box;
}

.wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100lvh;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  display: flex;
  justify-content: center;
  align-items: center;
  
  font-size: 5rem;
  font-family: sans-serif;
  
/*   isolation: isolate; */
  
  overflow: hidden;
}

.slide h2 {
  mix-blend-mode: hard-light;
  color: crimson;
  text-shadow: 0px 4px 4px black;
}

img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
/*   z-index: -1; */
}
</style>


  
  
</head>

<body translate="no">
  <div class="js-wrapper wrapper">
  <section class="js-slide slide">
    <div class="js-slideContent">

      <img src="//repo.bfw.wiki/bfwrepo/image/66a0800c8ba53.png" alt="">
      <h2>Slide 1</h2>
    </div>
  </section>
  <section class="js-slide slide">
    <div class="js-slideContent">

      <img src="//repo.bfw.wiki/bfwrepo/image/66a07fdd0875f.png" alt="">
      <h2>Slide 2</h2>
    </div>
  </section>
  <section class="js-slide slide">
    <img src="//repo.bfw.wiki/bfwrepo/image/66a07fcf6f041.png" alt="">
    <div class="js-slideContent">
      <h2>Slide 3</h2>
    </div>
  </section>
  <section class="js-slide slide">
    <img src="//repo.bfw.wiki/bfwrepo/image/66a07fb0017fd.png" alt="&qu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0