css+js实现可爱小猫咪化妆装扮效果代码

代码语言:html

所属分类:其他

代码描述:css+js实现可爱小猫咪化妆装扮效果代码,点击右侧眼镜、帽子、领结给小猫咪装扮。

代码标签: css 可爱 小猫咪 化妆 装扮

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

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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
}

.container {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.wrapper {
  height: 300px;
  width: 300px;
  position: relative;
  background-color: #7070f3;
  border-radius: 50%;
  overflow: hidden;
}
.controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.controls input {
  display: none;
}

.body {
  height: 80px;
  width: 40%;
  position: absolute;
  bottom: -2%;
  right: 50%;
  transform: translateX(50%);
  background-color: #f4f4f4;
  clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
}

.head {
  height: 130px;
  width: 58%;
  border-radius: 50%;
  position: absolute;
  z-index: 5;
  bottom: 60px;
  right: 50%;
  transform: translateX(50%);
  background-color: #f4f4f4;
  overflow: hidden;
}

.head::before {
  content: "";
  aspect-ratio: 1/1;
  width: 60%;
  position: absolute;
  left: -25%;
  top: -20%;
  border-radius: 50%;
  background-color: #f7bcd1;
}
.head::after {
  content: "";
  aspect-ratio: 1/1;
  width: 60%;
  position: absolute;
  right: -25%;
  top: -20%;
  border-radius: 50%;
  background-color: #f7bcd1;
}

.ears {
  display: flex;
  gap: 3rem;
  position: absolute;
  bottom: 140px;
  right: 50%;
  transform: translateX(50%);
}
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0