css实现宇航员飞天动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现宇航员飞天动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
*,
*:after,
*:before {
box-sizing: border-box;
}
body {
display: flex;
height: 100vh;
background-color: #08121c;
background-image: radial-gradient(white, rgba(255, 255, 255, 0.2) 2px, transparent 10px), radial-gradient(white, rgba(255, 255, 255, 0.15) 1px, transparent 10px), radial-gradient(white, rgba(255, 255, 255, 0.1) 2px, transparent 5px), radial-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1) 2px, transparent 1px);
background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
overflow: hidden;
}
.astronaut {
position: relative;
margin: auto;
transform: translatey(-100px);
}
.astronaut:after {
content: "";
position: absolute;
top: 130px;
z-index: -1;
width: 15px;
height: 210px;
border-radius: 0 0 20px 20px;
box-shadow: 30px 0 0 0 #A682FF, 45px 0 0 0 #715AFF, 60px 0 0 0 #5887FF, 75px 0 0 0 #55C1FF, 90px 0 0 0 #a0f8fe;
}
.astronaut:before {
content: "";
position: absolute;
top: 285px;
left: -100px;
z-index: 1;
width: 50px;
height: 50px;
border-radius: 50%;
-webkit-animation: bubbles 0.5s infinite alternate;
animation: bubbles 0.5s infinite alternate;
}
.body {
-webkit-animation: shake 1.5s infinite alternate;
animation: shake 1.5s infinite alternate;
}
.backpack {
background: #ddd;
width: 135px;
height: 100px;
border: 2px solid;
border-radius: 40px;
}
.hands {
position: absolute;
top: 100px;
left:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0