three+gsap实现三维模型与数字翻转动画效果代码

代码语言:html

所属分类:动画

代码描述:three+gsap实现三维模型与数字翻转动画效果代码,鼠标悬浮数字渐显。

代码标签: three gsap 三维 模型 数字 翻转 动画

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

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

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



  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap");
body {
  font-family: "Raleway", sans-serif;
  font-optical-sizing: auto;
  font-weight: 517;
  font-style: normal;
  font-variant-numeric: lining-nums;
  -ms-font-feature-settings: "lnum" 1;
  -o-font-feature-settings: "lnum" 1;
  font-feature-settings: "lnum" 1;
}

.screen {
  margin-bottom: 50vh;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background-color: black;
  background-color: #393939;
}

.screen__in {
  position: absolute;
  top: calc(50% - 50vmax);
  left: calc(50% - 50vmax);
  width: 100vmax;
  aspect-ratio: 1;
  display: grid;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-template-rows: repeat(20, 1fr);
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
}

.number {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5vmax;
  color: white;
  opacity: 0;
  font-variant-numeric: lining-nums;
  -ms-font-feature-settings: "lnum" 1;
  -o-font-feature-settings: "lnum" 1;
  font-feature-settings: "lnum" 1;
}

.slider {
  position: absolute;
  top: calc(50% - 50vmax);
  left: calc(50% - 50vmax);
  width: 100vmax;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.slider img {
  height: 75vh;
}

#model-container {
  width: 100%;
  height: 100vh;
}

.current-number {
  position: absolute;
  display: flex;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 20vmax;
  mix-blend-mode: difference;
  color: #fff;
}
.prev-next {
  position: absolute;
  display: flex;
  bottom: 50px;
  width: 100%;
  justify-content: center;
  list-style-type: none;
  margin: 0;
  padding: 0;
}
</style>


  
</head>

<body translate="no">
  <div class="screen">
	<div class="screen__in">
		<span class="number">1</span>
		<span class="number">5</span>
		<span class="number">5</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">8</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">4</span>
		<span class="number">8</span>
		<span class="number">4</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">0</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">8</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">7</span>
		<span class="number">5</span>
		<span class="number">2</span>
		<span class="number">4</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">8</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">8</span>
		<span class="number">2</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">2</span>
		<span class="number">1</span>
		<span class="number">0</span>
		<span class="number">1</span>
		<span class="number">0</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">0</span>
		<span class="number">8</span>
		<span class="number">5</span>
		<span class="number">0</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">8</span>
		<span class="number">7</span>
		<span class="number">5</span>
		<span class="number">8</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">5</span>
		<span class="number">2</span>
		<span class="number">3</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">0</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">7</span>
		<span class="number">9</span>
		<span class="number">2</span>
		<span class="number">0</span>
		<span class="number">1</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">4</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">8</span>
		<span class="number">7</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">1</span>
		<span class="number">2</span>
		<span class="number">9</span>
		<span class="number">0</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">0</span>
				<span class="number">1</span>
		<span class="number">5</span>
		<span class="number">5</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">8</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">4</span>
		<span class="number">8</span>
		<span class="number">4</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">0</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">8</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">7</span>
		<span class="number">5</span>
		<span class="number">2</span>
		<span class="number">4</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">8</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">8</span>
		<span class="number">2</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">2</span>
		<span class="number">1</span>
		<span class="number">0</span>
		<span class="number">1</span>
		<span class="number">0</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">0</span>
		<span class="number">8</span>
		<span class="number">5</span>
		<span class="number">0</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">8</span>
		<span class="number">7</span>
		<span class="number">5</span>
		<span class="number">8</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">5</span>
		<span class="number">2</span>
		<span class="number">3</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">0</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">7</span>
		<span class="number">9</span>
		<span class="number">2</span>
		<span class="number">0</span>
		<span class="number">1</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">4</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">8</span>
		<span class="number">7</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">1</span>
		<span class="number">2</span>
		<span class="number">9</span>
		<span class="number">0</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">0</span>
				<span class="number">1</span>
		<span class="number">5</span>
		<span class="number">5</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">8</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">4</span>
		<span class="number">8</span>
		<span class="number">4</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">0</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">8</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">7</span>
		<span class="number">5</span>
		<span class="number">2</span>
		<span class="number">4</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">8</span>
		<span class="number">7</span>
		<span class="number">2</span>
		<span class="number">8</span>
		<span class="number">2</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">2</span>
		<span class="number">1</span>
		<span class="number">0</span>
		<span class="number">1</span>
		<span class="number">0</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">0</span>
		<span class="number">8</span>
		<span class="number">5</span>
		<span class="number">0</span>
		<span class="number">3</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">8</span>
		<span class="number">7</span>
		<span class="number">5</span>
		<span class="number">8</span>
		<span class="number">3</span>
		<span class="number">6</span>
		<span class="number">5</span>
		<span class="number">2</span>
		<span class="number">3</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">6</span>
		<span class="number">0</span>
		<span class="number">6</span>
		<span class="number">9</span>
		<span class="number">3</span>
		<span class="number">2</span>
		<span class="number">5</span>
		<span class="number">7</span>
		<span class="number">9</span>
		<span class="number">2</span>
		<span class="number">0</span>
		<span class="number">1</span>
		<span class="number">4</span>
		<span class="number">9</span>
		<span class="number">4</span>
		<span class="number">6</span>
		<span class="nu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0