纯css实现羊驼动画效果自适应
代码语言:html
所属分类:布局界面
代码描述:纯css实现羊驼动画效果自适应
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
background: #f5e9c7;
background: linear-gradient(#f5e9c7, #f1e1b1, #f1e1b1 92vmin, #e87e70 calc( 92vmin + 1px ), #e46a5a);
min-height: 100vh;
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
overflow: hidden;
}
.flex {
display: -webkit-box;
display: flex;
}
.clouds {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 50%;
-webkit-transform: translate3d(-50%, 0, 0);
transform: translate3d(-50%, 0, 0);
}
.clouds div,
.clouds div::before,
.clouds div::after {
border-radius: 50% 50% 0 0 / 100% 100% 0 0;
bottom: 0;
}
.clouds div {
background-color: #f0aea5;
position: absolute;
}
.clouds div:first-child {
width: 20vmin;
height: 10vmin;
top: 5%;
left: 10%;
}
.clouds div:first-child::before {
content: '';
width: 50%;
height: 50%;
position: absolute;
background-color: #f3bdb6;
left: -20%;
}
.clouds div:first-child::after {
content: '';
width: 30%;
height: 30%;
position: absolute;
background-color: #f2b5ae;
right: -15%;
}
.clouds div:last-child {
width: 30vmin;
height: 15vmin;
top: 15%;
right: 15%;
}
.clouds div:last-child::before {
content: '';
width: 40%;
height: 40%;
position: absolute;
background-color: #f4c1bb;
left: -15%;
}
.clouds div:last-child::after {
content: '';
width: 70%;
height: 70%;
position: absolute;
background-color: #f3b9b2;
right: -25%;
}
.alpaca {
width: 50vmin;
height: 80vmin;
}
.alpaca__top, .alpaca__btm {
width: 100%;
height: 50%;
position: relative;
}
.alpaca__top {
-webkit-box-pack: justify;
justify-content: space-between;
}
.head {
width: 40%;
height: 100%;
position: relative;
-webkit-box-align: end;
align-items: flex-end;
}
.head__ears {
width: 100%;
height: 28%;
-webkit-box-pack: justify;
justify-content: space-between;
position: absolute;
top: 0;
left: 0;
}
.head__ears div {
background-color: #75c9b1;
width: 25%;
height: 100%;
width: 25%;
position: relative;
}
.head__ears div::after {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0