div+css绘制一个女孩闭眼的效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css绘制一个女孩闭眼的效果代码

代码标签: 女孩 闭眼 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
<style>
.cartoon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vmin;
  height: 80vmin;
}

.cartoon div {
  position: absolute;
  box-sizing: border-box;
}

.b {
  border: 0.5vmin solid;
}

.r {
  border-radius: 100%;
}

.hb::before,
.ha::after {
  content: "";
  display: block;
  position: absolute;
  box-sizing: border-box;
}

/****/
.canvas {
  top: 5%;
  height: 90%;
  width: 60%;
  background: #222;
  border-radius: 100% / 120% 115% 30% 30%;
  left: 50%;
  transform: translate(-50%, 0);
}

.body {
  width: 90%;
  height: 40%;
  background: white;
  border-radius: 100% / 130% 120% 60% 60%;
  left: 50%;
  transform: translate(-50%, 0);
  bottom: 2%;
  box-shadow: 
    inset -7vmin -13vmin 0 -2vmin #369,
    inset 0 -4vmin white,
    inset 20vmin 2vmin 0 2vmin white,
    inset 21.5vmin -0.75vmin 0 1.35vmin #222;
}

.head {
  width: 29vmin;
  height: 33vmin;
  background: #fff;
  border-radius: 50%;
  left: 50%;
  top: 3%;
  transform: translate(-50%, 0);
}

.head::after {
  width: 50%;
  height: 80%;
  border-radius: 50%;
  transform: rotate(18deg);
  top: 76%;
  left: -20%;
  box-shadow: 6vmin -2vmin 0 2vmin white
}

.head::before {
  width: 50%;
  height: 80%;
  border-radius: 50%;
  transform: rotate(-18deg);
  top: 76%;
  right: -20%;
  box-shadow: -5vmin -2vmin 0 2vmin white
}

.hair-1 {
  width: 50%;
  height: 50%;
  background: #222;
  border-radius: 100% 0; 
  top: -14%;
  left: 44%;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0