div+css布局实现卡通女孩打坐修行练瑜伽效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现卡通女孩打坐修行练瑜伽效果代码
代码标签: div css 卡通 女孩 打坐 修行 练 瑜伽
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--p-c: #a9d1e1;
--p-c-700: #86bfd0;
--s-c: #e9fafd;
--sk-c: #f4a17f;
--h-c: #1d3443;
--sk-c-600: #bd694d;
--t-c: #fdd3bc;
--pt-c: #d15a5b;
}
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background-color: var(--p-c);
min-width: fit-content;
min-height: 600px;
position: relative;
}
img {
width: 100%;
position: absolute;
z-index: -9999;
}
main {
width: 500px;
aspect-ratio: 1;
position: relative;
animation: move 10s linear infinite;
flex-shrink: 0;
}
/* -----------------Dots------------------- */
ul {
list-style: none;
animation: balls 10s linear infinite;
}
ul > li {
position: absolute;
width: 20px;
aspect-ratio: 1;
background-color: var(--s-c);
border-radius: 50%;
}
ul > li:nth-child(3n) {
width: 10px;
height: 10px;
}
ul > li:first-child {
top: 20px;
left: 50%;
}
ul > li:nth-child(2) {
left: 115px;
top: 190px;
}
ul > li:nth-child(3) {
left: 100px;
top: 280px;
}
ul > li:nth-child(4) {
left: 50px;
top: 330px;
}
ul > li:nth-child(5) {
right: 40px;
top: 260px;
width: 15px;
}
ul > li:nth-child(6) {
right: 170px;
top: 340px;
}
ul > li:nth-child(7) {
right: 85px;
top: 160px;
width: 15px;
}
ul > li:nth-child(8) {
right: 180px;
bottom: 35px;
width: 15px;
}
ul > li:nth-child(9) {
right: 150px;
top: 185px;
}
ul > li:nth-child(10) {
left: 130px;
top: 90px;
width: 10px;
}
ul > li:nth-child(11) {
left: 40px;
top: 130px;
width: 8px;
}
/* --------------------shadow--------------------------- */
.shadow {
position: absolute;
bottom: 15px;
height: 10px;
width: 70%;
left: 50%;
transform: translateX(-50%);
border-radius: 100%;
background-color: var(--p-c-700);
}
/* -------------------------circle paths------------------------- */
.circles div {
position: absolute;
width: 290px;
height: 250px;
border: 3px solid var(--s-c);
border-right-color: transparent;
border-bottom-color: transparent;
transform: rotate(-45deg);
border-radius: 50%;
top: 110px;
left: 65px;
}
.circles div:nth-child(2) {
left: 115px;
width: 270px;
top: 100px;
transform: rotate(-40deg);
}
.circles div:nth-child(3) {
left: 155px;
width: 250px;
top: 130px;
transform: rotate(-220deg);
}
.circles div:nth-child(4) {
left: 205px;
width: 200px;
border: 3px solid var(--s-c);
top: 100px;
transform: rotate(-120deg);
}
/* ------------------------character--------------------- */
.face {
width: 80px;
height: 80px;
position: absolute;
left: 51%;
top: 90px;
/* opacity: 0; */
border-radius: 20px;
transform: translateX(-50%) rotate(45deg);
background-color: var(--h-c);
overflow: hidden;
}
.face::before,
.face::after {
position: absolute;
content: "";
width: 120px;
height: 200px;
background-color: var(--sk-c);
left: 10px;
bottom: 0px;
border-radius: 35px;
transform: rotate(-5deg);
}
.face::after {
bottom: 65px;
left: -59px;
width: 200px;
border-radius: 200px;
background-color: inherit;
}
.ear {
width: 15px;
height: 25px;
border-radius: 50%;
background: var(--sk-c);
position: absolute;
top: 125px;
left: 287px;
transform: rotate(13deg);
z-index: 5;
}
/* ---------------------eye------------------ */
.eyebrow {
position: absolute;
width: 23px;
top: 39px;
left: 23px;
transform: rotate(19deg);
height: 25px;
border-radius: 50%;
border: 3px solid transparent;
border-left-color: var(--h-c);
}
.eyebrow::after {
position: absolute;
content: "";
width: 23px;
height: 25px;
border: inherit;
top: -15px;
left: 22px;
transform: translate(-50%, -50%) rotate(45deg);
border-radius: inherit;
}
.eye {
position: absolute;
width: 16px;
height: 12px;
top: 45px;
left: 25px;
transform: rotate(305deg);
border-radius: 50%;
border-bottom: 2px solid var(--h-c);
}
.eye::after {
position: absolute;
content: "";
width: 100%;
height: 100%;
left: 30px;
top: 8px;
transform: rotate(13deg);
border: inherit;
border-radius: inherit;
}
.nose .........完整代码请登录后点击上方下载按钮下载查看
网友评论0