css+scene实现大熊猫在竹林吃竹子动画效果代码

代码语言:html

所属分类:动画

代码描述:css+scene实现大熊猫在竹林吃竹子动画效果代码

代码标签: css scene 大熊猫 竹林 竹子 动画

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

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

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

  
  
  
<style>
html, body, .container {
  position: relative;
  margin: 0;
  padding: 0;
  height: 100%;
}
body {
  background: #ABD583;
}
.container {
  overflow: hidden;
}

.panda {
  position: absolute;
  width: 150px;
  height: 180px;
  left: 50%;
  bottom: 50%;
  transform: translate(-50%, 98px) translateX(20px);
}
.body {
  position: absolute;
  width: 95px;
  height: 100px;
  /*   border: 2px solid #333; */
  background: #333;
  top: 80px;
  left: 5px;
  border-radius: 30% 70% 30% 30% / 70% 70% 30% 30%;
}
.belly {
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
  overflow: hidden;
}
.belly:after {
  position: absolute;
  content: "";
  width: 100%;
  height: 57px;
  background: #fff;
  border-radius: 50% 50% 30% 30% / 30% 30% 40% 40% ;
  right: 0;
  bottom: 0;
}
.leg {
  position: absolute;
  width: 70px;
  height: 30px;
  left: 25px;
  bottom: -2px;
  background: #333;
  border-radius: 15px 55px 50px 15px / 50% 60% 5px 50%;
}
.foot {
  position: absolute;
  width: 16px;
  height: 32px;
  background: #333;
  right: -6px;
  bottom: 1px;
  border-radius: 60% 40% 4px 60% / 20px 8px 4px 2px;
}
.leg.left {
  left: 35px;
  bottom: 5px;
}
.arm, .hand, .forearm {
  position: absolute;
  width: 30px;
  height: 60px;
  background: #333;
  border-radius: 50% 50% / 15px;
  transform-origin: 50% 15px;
}
.forearm, .hand {
  top: calc(100% - 30px);
}
.arm {
  top: 14px;
  height: 60px;
}
.hand {
  height: 50px;
}
.hand:after {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
}
.arm.left {
  top: 0;
  left: 30px;
  transform: rotate(-70deg);
}
.arm.right {
  left: 10px;
  transform: rotate(-60deg);
}
.arm.right .forearm {
  transform: rotate(-20deg);
}
.arm.right .hand {
  transform: rotate(-20deg);
}
.arm.left .forearm {
  transform: rotate(-40deg);
}
.arm.left .hand {
  transform: rotate(-20deg);
}
.head {
  position: absolute;
  background: #fff;
  width: 110px;
  height: 100px;
  bottom: 85%;
  left: -6%;
  border-radius: 50% 50% 40px 45px / 50% 50% 35% 35%;
}
.head.front {
  background: transparent;
  overflow: hidden;
}
.face {
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
}
.eye {
  position: absolute;
  width: 40px;
  height: 22px;
  background: #333;
  border-radius: 50%;
  top: 40px;
}
.eye:after {
  position: absolute;
  content: "";
  width: 5px;
  height: 5px;
  background: #393939;
  border-radius: 50%;
  top: 36%;
}
.eye.right {
  right: 43%;
  transform: rotate(-50deg);
}
.eye.right:after {
  right: 15px;
}
.ey.........完整代码请登录后点击上方下载按钮下载查看

网友评论0