div布局实现一个万圣节主题卡通效果代码

代码语言:html

所属分类:动画

代码描述:div布局实现一个万圣节主题卡通效果代码

代码标签: 一个 万圣节 主题 卡通 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
  
<style>
:root {
  --black: #3b3737;
  --white: #fff;
  --grey: #dedede;
  --primary-color: #e8deac;
  --primary-color-dark: #ddce84;
  --primary-color-tint: #f3eed4;
  --secondary-color: #85725f;
  --secondary-color-dark: #67594a;
  --secondary-color-tint: #9f8c78;
  --accent-color: #d65a2d;
  --tail-color: #7a6754;
  --tail-color-tint: #a38d77;
  --background-color: #4d4949;
  --disguise-break-transition: 0.6s cubic-bezier(1, -0.6, 0.81, 1.41);
  --shadow-claw-transition: 0.2s ease-out;
}

* {
  box-sizing: border-box;
}

body {
  display: grid;
  place-items: center;
  height: 100vh;
  background-color: var(--background-color);
  font-size: 16px;
  line-height: 1;
}

.mimikyu {
  position: relative;
  cursor: pointer;
}
.mimikyu-disguise-line::before, .mimikyu-disguise-line::after {
  content: '';
}
.mimikyu-disguise-line, .mimikyu-disguise-line::before, .mimikyu-disguise-line::after {
  position: absolute;
  border: inherit;
  border-radius: inherit;
}
.mimikyu-disguise-eye {
  position: absolute;
  z-index: 3;
  bottom: 3.5rem;
  border-radius: 100%;
  border: 3px solid;
  color: var(--black);
}
.mimikyu-disguise-eye::before {
  height: 90%;
  width: 90%;
  left: 5%;
}
.mimikyu-disguise-eye::after {
  height: 70%;
  width: 70%;
  left: 5%;
}
.mimikyu-disguise-eye-left {
  left: 2rem;
  height: 2.5rem;
  width: 2rem;
}
.mimikyu-disguise-eye-left .mimikyu-disguise-line {
  top: 10%;
  left: 20%;
  height: 70%;
  width: 70%;
}
.mimikyu-disguise-eye-left .mimikyu-disguise-line::before {
  top: 10%;
  left: 10%;
  height: 80%;
  width: 80%;
}
.mimikyu-disguise-eye-left .mimikyu-disguise-line::after {
  top: 10%;
  left: 10%;
  height: 40%;
  width: 40%;
}
.mimikyu-disguise-eye-right {
  right: 2rem;
  height: 3rem;
  width: 2.25rem;
}
.mimikyu-disguise-eye-right .mimikyu-disguise-line-1 {
  top: 10%;
  left: 20%;
  height: 85%;
  width: 80%;
}
.mimikyu-disguise-eye-right .mimikyu-disguise-line-1::before {
  top: 10%;
  left: 10%;
  height: 80%;
  width: 80%;
}
.mimikyu-disguise-eye-right .mimikyu-disguise-line-1::after {
  top: 0;
  left: -10%;
  height: 90%;
  width: 90%;
}
.mimikyu-disguise-eye-right .mimikyu-disguise-line-2 {
  top: 30%;
  left: 40%;
  height: 40%;
  width: 50%;
}
.mimikyu-disguise-eye-right .mimikyu-di.........完整代码请登录后点击上方下载按钮下载查看

网友评论0