css实现太空飞船弹射动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现太空飞船弹射动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
overflow: hidden;
}
sky {
display: block;
background: black;
width: 100vw;
height: 100vh;
}
star {
border-radius: 50%;
background: white;
position: absolute;
-webkit-animation: star linear infinite;
animation: star linear infinite;
}
star:nth-child(1) {
width: 4px;
height: 4px;
-webkit-animation-duration: 29s;
animation-duration: 29s;
-webkit-animation-delay: -14s;
animation-delay: -14s;
top: 91vh;
}
star:nth-child(2) {
width: 6px;
height: 6px;
-webkit-animation-duration: 32s;
animation-duration: 32s;
-webkit-animation-delay: -19s;
animation-delay: -19s;
top: 70vh;
}
star:nth-child(3) {
width: 8px;
height: 8px;
-webkit-animation-duration: 27s;
animation-duration: 27s;
-webkit-animation-delay: -14s;
animation-delay: -14s;
top: 47vh;
}
star:nth-child(4) {
width: 5px;
height: 5px;
-webkit-animation-duration: 42s;
animation-duration: 42s;
-webkit-animation-delay: -3s;
animation-delay: -3s;
top: 7vh;
}
star:nth-child(5) {
width: 6px;
height: 6px;
-webkit-animation-duration: 39s;
animation-duration: 39s;
-webkit-animation-delay: -8s;
animation-delay: -8s;
top: 64vh;
}
star:nth-child(6) {
width: 9px;
height: 9px;
-webkit-animation-duration: 40s;
animation-duration: 40s;
-webkit-animation-delay: -5s;
animation-delay: -5s;
top: 47vh;
}
star:nth-child(7) {
width: 10px;
height: 10px;
-webkit-animation-duration: 29s;
animation-duration: 29s;
-webkit-animation-delay: -20s;
animation-delay: -20s;
top: 27vh;
}
star:nth-child(8) {
width: 9px;
height: 9px;
-webkit-animation-duration: 33s;
animation-duration: 33s;
-webkit-animation-delay: -15s;
animation-delay: -15s;
top: 43vh;
}
star:nth-child(9) {
width: 7px;
height: 7px;
-webkit-animation-duration: 36s;
animation-duration: 36s;
-webkit-animation-delay: -29s;
animation-delay: -29s;
top: 21vh;
}
star:nth-child(10) {
width: 9px;
height: 9px;
-webkit-animation-duration: 27s;
animation-duration: 27s;
-webkit-animation-delay: -21s;
animation-delay: -21s;
top: 18vh;
}
star:nth-child(11) {
width: 10px;
height: 10px;
-webkit-animation-duration: 31s;
animation-duration: 31s;
-webkit-animation-delay: -36s;
animation-delay: -36s;
top: 65vh;
}
star:nth-child(12) {
width: 7px;
height: 7px;
-webkit-animation-duration: 44s;
animation-duration: 44s;
-webkit-animation-delay: -16s;
animation-delay: -16s;
top: 95vh;
}
star:nth-child(13) {
width: 9px;
height: 9px;
-webkit-animation-duration: 44s;
animation-duration: 44s;
-webkit-animation-delay: -2s;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0