swiper实现图文九宫格图文切换幻灯片效果代码

代码语言:html

所属分类:幻灯片

代码描述:swiper实现图文九宫格图文切换幻灯片效果代码,带有入场动画效果。

代码标签: swiper 图文 九宫格 图文 切换 幻灯片

下面为部分代码预览,完整代码请点击下载或在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.11.0.4.css">
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Courgette&family=Montserrat:wght@300;400;500;600;700&display=swap");

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

body {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #000;
  min-height: 100vh;
  background-image: linear-gradient(
    120deg,
    rgba(7, 7, 9, 1) 16%,
    rgba(27, 24, 113, 1) 96%
  );
  background-repeat: no-repeat;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: transparent;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  z-index: -1;
}

.swiper {
  width: 100%;
  height: 100%;
}

.swiper-slide {
  position: relative;
  display: grid;
  grid-template-columns: 45% 50%;
  place-items: center;
  gap: 40px;
  overflow: hidden;
  padding: 130px 60px;
}

.content {
  padding: 0 50px;
  font-family: "Montserrat", sans-serif;
}

.content h1 {
  font-family: "Courgette", cursive;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.3;
  margin-bottom: 30px;
  color: #f6af61;
  pointer-events: none;
}

.content p {
  font-family: inherit;
  font-size: clamp(1.1rem, 5vw, 0.9rem);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 30px;
  color: #bababb;
  text-align: justify;
  pointer-events: none;
}

.swiper-slide .content h1 {
  transform: translateY(-40px);
  opacity: 0;
  transitio.........完整代码请登录后点击上方下载按钮下载查看

网友评论0