div+css布局实现一个小鸡效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局实现一个小鸡效果代码

代码标签: 一个 小鸡 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
<style>
html,
body {
  width: 100%;
  height: 100%;
  background: #e6a81a;
  overflow: hidden;
}
html *,
body * {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  box-sizing: border-box;
}
html *:before, html *:after,
body *:before,
body *:after {
  content: "";
  position: absolute;
}

.chicken {
  width: 55vmin;
  height: 64vmin;
}
.chicken .comb-1 {
  width: 10.2vmin;
  height: 10vmin;
  background: #a10300;
  z-index: 3;
  top: -48.5vmin;
  left: -26vmin;
  transform: rotate(-25deg);
  border-top-right-radius: 50%;
  border-top-left-radius: 60%;
  box-shadow: 0 0 0 1vmin #000, inset 2.1vmin 1.3vmin 0 0.5vmin #d10f05;
}
.chicken .comb-1::before {
  width: 3vmin;
  height: 3vmin;
  background: #a10300;
  top: 6.7vmin;
  left: 9vmin;
  transform: rotate(35deg);
}
.chicken .comb-1::after {
  width: 1.5vmin;
  height: 1.6vmin;
  background: #d10f05;
  left: 10.3vmin;
  top: 5.5vmin;
  transform: rotate(-25deg);
  border-bottom-left-radius: 100%;
}
.chicken .comb-2 {
  width: 9.2vmin;
  height: 7.5vmin;
  background: #a10300;
  top: -50vmin;
  left: -6.5vmin;
  z-index: 2;
  border-top-right-radius: 5vmin;
  border-top-left-radius: 5vmin;
  box-shadow: 0 0 0 1vmin #000;
  overflow: hidden;
}
.chicken .comb-2::before {
  width: 2vmin;
  height: 3.2vmin;
  background: #d10f05;
  transform: rotate(50deg);
  left: 1.3vmin;
}
.chicken .comb-2::after {
  width: 2vmin;
  height: 4vmin;
  background: #d10f05;
  transform: rotate(70deg);
  left: 3.7vmin;
  top: -1.8vmin;
}
.chicken .comb-3 {
  width: 9vmin;
  height: 10vmin;
  background: #a10300;
  top: -38vmin;
  left: 8.8vmin;
  z-index: 3;
  border-top-right-radius: 100%;
  border-top-left-radius: 5vmin;
  box-shadow: 0 0 0 1vmin #000;
}
.chicken .comb-3::before {
  width: 4vmin;
  height: 4vmin;
  background: #a10300;
  left: -2.35vmin;
  top: -1.2vmin;
  border-top-right-radius: 0.5vmin;
  transform: rotate(-5deg);
}
.chicken .tail-1 {
  width: 14vmin;
  height: 7.5vmin;
  background: #a10300;
  left: 36.4vmin;
  top: 5.2vmin;
  z-index: 3;
  border-top-right-radius: 3vmin;
  border-bottom-right-radius: 100%;
  box-shadow: 0 0.1vmin 0 1.1vmin #000, inset -0.7vmin 1vmin 0 0.2vmin #d10f05;
}
.chicken .tail-1::before {
  width: 5vmin;
  height: 2.5vmin;
  background: #a10300;
  left: 3vmin;
  top: 7.15vmin;
  transform: rotate(-5deg);
}
.chicken .tail-1::after {
  width: 1.2vmin;
  height: 1.2vmin;
  border-radius: 50%;
  background: #000;
  top: 7.1vmin;
  left: 7.4vmin;
  box-shadow: 0.5vmin -0.15vmin 0 0.01vmin #000, 0.4vmin 0.9vmin 0 0.1vmin #d10f05;
}
.chicken .tail-2 {
  width: 20vmin;
  height: 12vmin;
  background: #a10300;
  left: 26.5vmin;
  top: 25.5vmin;
  border-radius: 0% 100% 100% 0% / 100% 30% 70% 0%;
  transform: rotate(-14deg);
  box-shadow: 0 0 0 1.1vmin #000, inset -0.6vmin 0.8vmin 0 0.5vmin #d10f05;
}
.chicken .body {
  height: 45.3vmin;
  width: 39.4vmin;
  background: #fff;
  left: -10.7vmin;
  top: 1.5vmin;
  z-index: 3;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 0 1vmin #000, inset -3.4vmin -2.3vmin 0 0.8vmin #d0d2d2;
}
.chicken .wing {
  height: 11.6vmin;
  width: 15.4vmin;
  background: #fff;
  z-index: 3;
  top: 7.8vmin;
  left: 7.5vmin;
  border-radius: 50.........完整代码请登录后点击上方下载按钮下载查看

网友评论0