div+css实现一个会眨眼睛的黏土人物形象代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现一个会眨眼睛的黏土人物形象代码

代码标签: div css 眨眼睛 黏土 人物 形象 代码

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

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

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

  
  
<style>
/*
Drawing inspired by the cartoon on this tweet:
https://twitter.com/charca/status/1845577967180947875
*/
body {
  overflow: clip;
}

article {
  --center: 45%;

  /* colors */
  --shirt: #e4ce61;
  --skin: #ddb88e;
  --feature: #333;
  --hair: #ee9247;
  --pants: #6ca1ba;

  /* color alternative */
/*     --shirt: #c83;
  --skin: #753;
  --feature: #333;
  --hair: #321;
  --pants: #696; */

  /* color alternative */
/*     --shirt: #eee;
  --skin: #fdb;
  --feature: #333;
  --hair: #c9c;
  --pants: #369; */

  font-size: 1vmin;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 0%);
  width: 80em;
  aspect-ratio: 1;
  overflow: hidden;
}

article *,
article *::before,
article *::after {
  position: absolute;
  box-sizing: border-box;
}

.pants {
  width: 30%;
  height: 20%;
  bottom: 0;
  left: var(--center);
  transform: translate(-50%);
  border-radius: 40% / 120% 120% 0 0;
  box-shadow: 
    inset 0 1em 1em #0003;
  background: 
    linear-gradient(182deg, #0003 30%, #0000 40%),
    linear-gradient(85deg, #ffffff18, #0000 60%, #0002 90%, #0001 0, #0000) 60% 0 / 12% 100% no-repeat,
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0