css布局实现愤怒的小鸟代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现愤怒的小鸟代码

代码标签: 愤怒 小鸟

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #69e9f0;
}

.bird {
  display: flex;
  justify-content: center;
  width: 100px;
  height: 100px;
  position: relative;
  transform: scale(3);
}

.bird * {
  position: absolute;
  box-sizing: border-box;
}

.head {
  height: 88px;
  width: 90px;
  border-radius: 200px 200px 183px 183px;
  background: #d5002c;
  border: 2px solid #000;
  overflow: hidden;
  box-shadow: inset 4px -5px 0px -3px rgba(0, 0, 0, 0.1);
}

.eyes {
  width: 40px;
  height: 20px;
  top: 30px;
  right: 9px;
}

.eye {
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #111;
}

.eye.left {
  width: 25px;
  box-shadow: inset 2px -5px 0px -3px rgba(0, 0, 0, 0.1),
    -0.3px 5px 0px 0px rgba(0, 0, 0, 0.25);
}

.eye.right {
  width: 18px;
  right: 0;
  box-shadow: inset 0px -13px 0px -10px rgba(0, 0, 0, 0.15),
    3px 3px 0px 0px rgba(0, 0, 0, 0.25);
}

.eye.left:after {
  content: "";
  position: absolute;
  top: 2px;
  left: -20px;
  width: 15px;
  height: 25px;
  background: #a80023;
  border-radius: 50%;
}

.eye.left:before {
  content: "";
  position: absolute;
  top: 15px;
  left: -32px;
  width: 10px;
  height: 15px;
  background: #a80023;
  border-radius: 50%;
}

.eyebrow {
  background: #000;
  width: 22px;
  height: 5px;
  z-index: 1;
  top: -1px;
}

.eyebrow.left {
  transform: rotate(20deg);
  left: 3px;
}

.eyebrow.right {
  transform: rotate(-20deg);
  right: -3px;
}

.eyebrow.left:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 4px;
  background: #000;
  bottom: 2px;
  transform: rotate(5deg);
}

.eyebrow.right:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 4px;
  background: #000;
  bottom: 2px;
  transform: rotate(-5deg);
}

.pupil {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #000;
  top: 6px;
}

.pupil.left {
  right: 5px;
}

.pupil.right {
  left: 2px;
}

.mouth {
  width: 40px;
  height: 20px;
  bottom: 19px;
  right: -9px;
  z-index: 2;
}

.peak.top {
  border-radius: 22% 78% 0% 100% / 100% 100% 0% 0%;
  width: 27px;
  height: 12px;
  background: #f3b41d;
  box-shadow: 0px 0px 0px 1px #000, inset 0.1px 2px 0.6px 1px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.peak.bo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0