css模拟小鸡跳舞动画效果
代码语言:html
所属分类:动画
代码描述:css模拟小鸡跳舞动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
*{
margin:0;
padding:0;
box-sizing:border-box;
}
body{
overflow:hidden;
animation: colorChange 3.6s infinite linear both;
}
@keyframes colorChange{
0%{
background-color: #ddf08b;
}
20%{
background-color: #edb272;
}
40%{
background-color: #ed8272;
}
60%{
background-color: #e0a6d2;
}
80%{
background-color: #a2aceb;
}
100%{
background-color: #a2ebcb;
}
}
.container{
width:100vw;
height:100vh;
display: flex;
justify-content: center;
align-items: center;
}
.chick{
display: flex;
flex-direction:column;
justify-content: center;
align-items: center;
position: relative;
}
.face{
width:40vmin;
height:35vmin;
border-radius:50%;
background-color: #f6f350;
border-top:1vmin solid #974549;
border-left:1vmin solid #974549;
border-right:1vmin solid #974549;
position: relative;
animation: dance 0.6s infinite both;
}
.face:after{
content:"";
width:42vmin;
height:25vmin;
border-radius:40% 40% 50% 50%;
background-color: #f6f350;
border-bottom:1vmin solid #974549;
border-left:1vmin solid #974549;
border-right:1vmin solid #974549;
position: absolute;
bottom:-10vmin;
left:-3vmin;
}
.l-face-cover{
width:20vmin;
height:12vmin;
background-color: #f6f350;
position: absolute;
top:12vmin;
left:1vmin;
z-index: 2;
}
.r-face-cover{
width:20vmin;
height:12vmin;
background-color: #f6f350;
position: absolute;
top:12vmin;
right:1vmin;
z-index: 2;
}
.l-eye, .r-eye{
width:3vmin;
height:6vmin;
bor.........完整代码请登录后点击上方下载按钮下载查看
网友评论0