gsap网格碎片化三维旋转动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap网格碎片化三维旋转动画效果代码

代码标签: 三维 旋转 动画 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
<style>
html {
  box-sizing: border-box;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  background-color: #2b4162;
  background-image: linear-gradient(10deg, #2b4162 0%, #12100e 74%);
  overflow: hidden;
}

body,
html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: auto;
  perspective: 600px;
}

.grid {
  display: grid;
  width: 35%;
  transform-style: preserve-3d;
}

.cell {
  position: relative;
  background: white;
}
.cell:before {
  padding-top: 100%;
  content: "";
  display: block;
}

.gsap-3-logo {
  width: 20vw;
  max-width: 150px;
  position: fixed;
  bottom: 15px;
  right: 15px;
}

/*  ==========================================================
	Collection Linl
	========================================================== */
.collection {
  position: fixed;
  z-index: 1000;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
}

.collection__link {
  position: relative;
  margin-bottom: 16px;
  color: white;
  font-family: noto-sans-condensed, Helvetica, sans-serif;
  text-decoration: none;
  font-size: 16px;
}
.collection__link span {
  display: block;
  position: absolute;
  bottom: -3px;
  left: 0;
  height: 1px;
  width: 10%;
  background-color: white;
  content: "";
  transition: width 0.3s;
}
.collection__link:hover span {
  width: 100%;
}

/*  ==========================================================
	Collection Linl
	========================================================== */
.collection {
  position: fixed;
  z-index: 1000;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
}

.collection__link {
  position: relative;
  margin-bottom: 16px;
  color: white;
  font-family: Helvetica, sans-serif;
  text-decoration: none;
  font-size: 16px;
}
.collection__link span {
  display: block;
  position: absol.........完整代码请登录后点击上方下载按钮下载查看

网友评论0