swiper+gsap+Observer+SplitText3实现全屏上下左右滚动作品展示个人简历代码

代码语言:html

所属分类:布局界面

代码描述:swiper+gsap+Observer+SplitText3实现全屏上下左右滚动作品展示个人简历代码,往下滚动翻页后可以看到更多的作品。

代码标签: swiper gsap Observer SplitText 全屏 上下 左右 滚动 作品 展示

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

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

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

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/swiper-bundle.10.3.1.css">
<style>
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&family=Permanent+Marker&family=Tilt+Neon&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

section {
  height: 100%;
  width: 100%;
  top: 0;
  position: fixed;
  visibility: hidden;
}

section .outer,
section .inner {
  width: 100%;
  height: 100%;
  overflow-y: hidden;
}

section .bg {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
}

/* HOME */

.home {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  background: rgb(72, 182, 153);
  background-image: linear-gradient(
    90deg,
    rgba(72, 182, 153, 0.8) 10%,
    rgba(56, 143, 168, 0.8) 48%,
    rgba(94, 73, 214, 0.8) 98%
  );
}

.home > img {
  position: absolute;
  right: 3%;
  bottom: 0;
  width: 100%;
  max-width: 600px;
  z-index: 5;
}

.home-content {
  position: absolute;
  left: 7%;
  font-family: "Nunito", sans-serif;
  width: min(500px, 100%);
  color: #fff;
  z-index: 5;
}

.home-content > h1 {
  font-family: inherit;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.music-note-icon {
  color: #fff;
  font-size: 3rem;
}

.home-content > p {
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 30px;
}

/* HOME - SCROLL */

.scroll {
  position: absolute;
  top: 50%;
  left: 50%;
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  overflow-x: hidden;
  scrollbar-width: none;
  width: 100%;
}

.scroll p {
  font-family: "Tilt Neon", sans-serif;
  font-size: 9rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.3);
  color: transparent;
  background-size: contain;
  background-clip: text;
  -webkit-background-clip: text;
}

.scroll p:nth-child(1) {
  animation: scrolling-rtl 25s infinite linear;
  margin-bottom: 210px;
}

.scroll p:nth-child(2) {
  animation: scrolling-ltr 25s infinite linear;
}

@keyframes scrolling-rtl {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

@keyframes scrolling-ltr {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* HOME - LINKS */

.links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.links li {
  list-style-type: none;
  text-decoration: none;
}

.links li a {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #6f66c7;
  border-radius: 50%;
  padding: 15px;
  color: #fff;
  transition: background-color 0.2s linear;
}

.links li a .icon {
  color: #fff;
  font-size: 1.3rem;
}

.links li a:hover {
  background-color: #257381;
}

.links li a:hover .icon {
  animation: slide-icon 1s linear 1;
}

@keyframes slide-icon {
  49% {
    transform: translateX(-20px);
    o.........完整代码请登录后点击上方下载按钮下载查看

网友评论0