纯css实现电影大白的卡通形象效果

代码语言:html

所属分类:动画

代码描述:纯css实现电影大白的卡通形象效果

代码标签: 电影 白的 卡通 形象 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
.cc, #baymax, #baymax .head, #baymax .head .mouth, #baymax .body, #baymax .body .chest, #baymax .body .chest i, #baymax .body .chest i:before, #baymax .body .belly {
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  position: absolute;
}

html, body {
  position: absolute;
  overflow: hidden;
  height: 100%;
  width: 100%;
  background-color: white;
}

body {
  background-color: rgba(176, 0, 2, 0.8);
}

#baymax {
  cursor: pointer;
  top: 50%;
  left: 50%;
}
#baymax .head {
  z-index: 10;
  top: -120px;
  left: 50%;
  border-radius: 50%;
  width: 90px;
  height: 60px;
  background-color: white;
  box-shadow: 0 -15px 30px rgba(23, 34, 45, 0.2) inset, 0 5px 15px rgba(23, 34, 45, 0.2);
}
#baymax .head .eye, #baymax .head .mouth {
  position: absolute;
  display: inline-block;
}
#baymax .head .eye {
  animation: blink 6s ease-in-out infinite;
  margin-top: -4.5px;
  background-color: #202b36;
  border-radius: 50%;
  width: 8.1px;
  height: 9px;
  top: 40%;
  left: 50%;
}
#baymax .head .eye.left {
  margin-left: -24.5px;
}
#baymax .head .eye.right {
  margin-left: 15.5px;
}
#baymax .head .mouth {
  top: 40%;
  left: 50%;
  width: 38px;
  background-color: #202b36;
  height: 1px;
}
#baymax .body {
  z-index: 5;
  top: 0px;
  left: 50%;
}
#baymax .body .arm {
  z-index: 1;
  position: absolute;
  left: 50%;
  top: 50%;
}
#baymax .body .arm.right {
  -moz-transform: scale(-1, 1);
  -ms-transform: scale(-1, 1);
  -webkit-transform: scale(-1, 1);
  transform: scale(-1, 1);
}
#baymax .body .arm.left {
  -moz-transform: scale(1, 1);
  -ms-transform: scale(1, 1);
  -webkit-transform: scale(1, 1);
  transform: scale(1, 1);
}
#baymax .body .arm .fingers:before, #baymax .body .arm .fingers:after {
  content: "";
  position: absolute;
  background-color: white;
  border-radius: 50%;
  width: 18px;
  height: 40px;
  z-index: 2;
}
#baymax .body .arm .fingers:before {
  margin-left: -130px;
  margin-top: 145px;
  box-shado.........完整代码请登录后点击上方下载按钮下载查看

网友评论0