gsap+CSSRulePlugin实现时尚服装幻灯片展示动画效果代码

代码语言:html

所属分类:幻灯片

代码描述:gsap+CSSRulePlugin实现时尚服装幻灯片展示动画效果代码,点击左右切换可实现幻灯片滚动入场出场动画,自带进度条展示,无限循环。

代码标签: gsap CSSRulePlugin 时尚 服装 幻灯片 展示 动画

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

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

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

  
  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&display=swap");

:root {
  font-size: 16px;
  font-family: "Oswald", sans-serif;
  --color-1: hsl(236, 74%, 55%);
  --color-2: hsl(0, 0%, 95%);
  --color-21: hsla(0, 0%, 95%, 0.5);
  --color-3: hsl(0, 0%, 5%);
  --color-4: hsl(0, 0%, 15%);
}

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

button,
input[type="submit"],
input[type="reset"] {
  background: none;
  color: inherit;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: inherit;
}

body {
  background-color: var(--color-3);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 40rem;
  margin: 1rem;
  border: 1px white solid;
  padding: 1rem;
  /* background-color: black; */
}

.title-of-slider {
  font-weight: 300;
  letter-spacing: 0.5rem;
  width: max-content;
  align-self: flex-start;
  color: var(--color-2);
  font-size: clamp(1rem, 4.5vw, 2rem);
  display: flex;
  flex-direction: column;
}

.title-of-slider > span {
  font-weight: 700;
}

#image-container {
  display: flex;
  gap: 0.5rem;
  /* background-color: red; */
  width: 100%;
  padding: 0.5rem 0;
  overflow: hidden;
}

.model-images {
  flex: none;
  width: 30%;
  translate: calc(-100% - 0.5rem);
}

.button-con.........完整代码请登录后点击上方下载按钮下载查看

网友评论0