css+TweenMax实现三维小狗狗盯着鼠标移动效果代码

代码语言:html

所属分类:三维

代码描述:css+TweenMax实现三维小狗狗盯着鼠标移动效果代码

代码标签: css TweenMax 三维 小狗 盯着 鼠标 移动

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

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

<head>
    <meta charset="UTF-8">
<style>
    body {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at center, #f2fcfe -20%, #1c92d2);
  background: -webkit-radial-gradient(circle at center, #f2fcfe -20%, #1c92d2);
  overflow: hidden;
}
body .body {
  position: absolute;
  width: 175px;
  height: 275px;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%) scale(0.5);
  perspective: 500px;
  margin-top: -25px;
  z-index: 1;
}
body .body .paw {
  position: absolute;
  width: 70px;
  height: 40px;
  background: #5c3f22;
  bottom: -130px;
  z-index: 4;
  left: -90px;
  background: linear-gradient(to bottom, #5c3f22, #5c3f22 20%, rgba(255, 255, 255, 0) 5%), linear-gradient(to right, #5c3f22, #5c3f22 20%, #49321b 20%, #49321b 26%, #5c3f22 26%, #5c3f22 69%, #49321b 69%, #49321b 75%, #5c3f22 75%);
}
body .body .paw.first {
  background: linear-gradient(to bottom, #f2eae8, #f2eae8 20%, rgba(255, 255, 255, 0) 20%), linear-gradient(to right, #f2eae8, #f2eae8 20%, #cdafa7 20%, #cdafa7 26%, #f2eae8 26%, #f2eae8 69%, #cdafa7 69%, #cdafa7 75%, #f2eae8 75%);
  right: auto;
  left: -40px;
  z-index: 9;
  width: 60px;
}
body .body .paw.second {
  background: linear-gradient(to bottom, #f2eae8, #f2eae8 20%, rgba(255, 255, 255, 0) 20%), linear-gradient(to right, #f2eae8, #f2eae8 20%, #cdafa7 20%, #cdafa7 26%, #f2eae8 26%, #f2eae8 69%, #cdafa7 69%, #cdafa7 75%, #f2eae8 75%);
  left: auto;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0