css实现地球新冠病毒戴口罩宣传插画动画效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现地球新冠病毒戴口罩宣传插画动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
html {
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
}
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
width: 100%;
background-color: #1f184f;
position: relative;
}
.covid-wrapper {
position: relative;
}
.covid-sticks {
position: absolute;
bottom: 33px;
left: 36px;
}
.covid {
background-image: url("//repo.bfw.wiki/bfwrepo/images/xinguang/dark-stripes.png"), linear-gradient(to left top, #9d1231, #ae1a38, #be2240, #d02a47, #e1324f, #ea4153, #f34e58, #fc5b5d, #fd6e61, #fe7f68, #ff8f70, #ff9e7a);
width: 410px;
height: 410px;
z-index: 2;
overflow: hidden;
position: relative;
border-radius: 50%;
-webkit-animation: pulse 2s infinite;
animation: pulse 2s infinite;
}
.covid-pulse {
content: "";
width: 480px;
height: 480px;
background-color: #2f184e;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-shadow: inset 0 0 25px #8f2453;
}
@-webkit-keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.21);
}
70% {
box-shadow: 0 0 8px 55px rgba(99, 32, 91, 0.1);
}
100% {
box-shadow: 0 0 0 0 rgba(99, 32, 91, 0.1);
}
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.21);
}
70% {
box-shadow: 0 0 8px 55px rgba(99, 32, 91, 0.1);
}
100% {
box-shadow: 0 0 0 0 rgba(99, 32, 91, 0.1);
}
}
.covid-stick {
position: absolute;
overflow: visible;
display: block;
width: 6px;
z-index: -1;
height: 50px;
background-image: url("//repo.bfw.wiki/bfwrepo/images/xinguang/dark-stripes.png"), linear-gradient(to left top, #9d1231, #ae1a38, #be2240, #d02a47, #e1324f, #ea4153, #f34e58, #fc5b5d, #fd6e61, #fe7f68, #ff8f70, #ff9e7a);
}
.covid-stick:before {
content: "";
position: absolute;
width: 16px;
height: 16px;
background-image: url("//repo.bfw.wiki/bfwrepo/images/xinguang/dark-stripes.png"), linear-gradient(to left top, #9d1231, #ae1a38, #be2240, #d02a47, #e1324f, #ea4153, #f34e58, #fc5b5d, #fd6e61, #fe7f68, #ff8f70, #ff9e7a);
top: 36px;
right: -5px;
border-radius: 50%;
}
.covid-stick:nth-child(1) {
bottom: 40px;
left: 40px;
transform: rotate(45deg);
}
.covid-stick:nth-child(2) {
bottom: 110px;
left: 8px;
transform: rotate(70deg);
}
.covid-stick:nth-child(3) {
bottom: 180px;
left: -14px;
transform: rotate(90deg);
}
.covid-stick:nth-child(4) {
bottom: 255px;
left: 10px;
transform: rotate(110deg);
}
.covid-stick:nth-child(5) {
bottom: 335px;
left: 51px;
transform: rotate(130deg);
}
.covid-stick:nth-child(6) {
bottom: 370px;
left: 122px;
transform: rotate(154deg);
}
.covid-stick:nth-child(7) {
bottom: 370px;
left: 277px;
transform: rotate(-154deg);
}
.covid-stick:nth-child(8) {
bottom: 396px;
left: 200px;
transform: rotate(180deg);
}
.covid-stick:nth-child(9) {
bottom: 335px;
left: 350px;
transform: rotate(-130deg);
}
.covid-stick:nth-child(10) {
bottom: 255px;
left: 390px;
transform: rotate(-110deg);
}
.covid-stick:nth-child(11) {
bottom: 180px;
left: 415px;
transform: rotate(-90deg);
}
.covid-stick:nth-child(12) {
bottom: 110px;
left: 392px;
transform: rotate(-70deg);
}
.covid-stick:nth-child(13) {
bottom: 40px;
left: 362px;
transform: rotate(-45deg);
}
.covid-spot {
background-image: url("//repo.bfw.wiki/bfwrepo/images/xinguang/dark-stripes.png");
background-color: #7f0918;
position: absolute;
border-radius: 50%;
}
.covid-spot:nth-child(1) {
top: 216px;
right: 50px;
width: 22px;
height: 22px;
background-color: #90101e;
}
.covid-spot:nth-child(2) {
top: 56px;
right: 140px;
width: 24px;
height: 24px;
background-color: #90101e;
}
.covid-spot:nth-child(3) {
top: 136px;
right: 35px;
width: 18px;
height: 18px;
background-color: #630510;
}
.covid-spot:nth-child(4) {
top: 46px;
right: 255px;
width: 28px;
height: 28px;
background-color: #bc413e;
}
.covid-spot:nth-child(5) {
top: 106px;
right: 335px;
width: 18px;
height: 18px;
background-color: #bc413e;
}
.covid-spot:nth-child(6) {
top: 206px;
right: 315px;
width: 52px;
height: 52px;
background: url("//repo.bfw.wiki/bfwrepo/images/xinguang/dark-stripes.png"), linear-gradient(305deg, #801015 0%, #aa3432 100%);
}
.covid-spot:nth-child(7) {
top: 256px;
right: 295px;
width: 14px;
height: 14px;
background-color: #801216;
}
.covid-spot:nth-child(8) {
top: 286px;
right: 365px;
width: 38px;
height: 38px;
background-color: #801216;
}
.covid-spot:nth-child(9) {
top: 286px;
right: 45px;
width: 16px;
height: 16px;
background-color: #801216;
}
.covid-spot:nth-child(10) {
top: 75px;
right: 75px;
width: 36px;
height: 36px;
background-color: #801216;
}
.covid-spot:nth-child(11) {
top: 240px;
right: 90px;
width: 50px;
height: 50px;
background-color: #7a0a14;
}
.virus {
position: absolute;
border-radius: 50%;
-webkit-animation: slip 7s linear infinite alternate;
animation: slip 7s linear infinite alternate;
}
.virus:nth-child(1) {
top: 0;
left: -20px;
width: 22px;
height: 22px;
background-color: #f43a62;
box-shadow: inset 0px 0px 0px 4px #8f2453, 0 0 12px 3px #8f2453;
-webkit-animation-delay: 0.6s;
animation-delay: 0.6s;
}
.virus:nth-child(2) {
top: 190px;
left: -140px;
width: 32px;
height: 32px;
background-color: #f43a62;
box-shadow: inset 0px 0px 0px 6px #8f2453, 0 0 12px 3px #8f2453;
-webkit-animation-delay: 0.7s;
animation-delay: 0.7s;
}
.virus:nth-child(3) {
top: 140px;
left: 540px;
width: 32px;
height: 32px;
background-color: #f08e61;
box-shadow: inset 0px 0px 0px 6px #90545d, 0 0 12px 3px #90545d;
-webkit-animation-delay: 1s;
animation-delay: 1s;
}
.virus:nth-child(4) {
top: 440px;
left: -70px;
width: 22px;
height: 22px;
background-color: #f08e61;
box-shadow: inset 0px 0px 0px 4px #90545d, 0 0 12px 3px #90545d;
-webkit-animation-delay: 0.3s;
animation-delay: 0.3s;
}
.virus:nth-child(5) {
top: 450px;
left: 560px;
width: 22px;
height: 22px;
background-color: #f43a62;
box-shadow: inset 0px 0px 0px 4px #8f2453, 0 0 12px 3px #8f2453;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
.virus:nth-child(6) {
top: -40px;
left: 460px;
width: 22px;
height: 22px;
background-color: #f43a62;
box-shadow: inset 0px 0px 0px 4px #8f2453, 0 0 12px 3px #8f2453;
-webkit-animation-delay: 2s;
animation-delay: 2s;
}
.virus:nth-child(7) {
top: -130px;
left: 200px;
width: 22px;
height: 22px;
background-color: #f08e61;
box-shadow: inset 0px 0px 0px 4px #90545d, 0 0 12px 3px #90545d;
-webkit-animation-delay: 1.4s;
animation-delay: 1.4s;
}
.virus:nth-child(8) {
top: 30px;
left: -180px;
width: 32px;
height: 32px;
background-color: #f08e61;
box-shadow: inset 0px 0px 0px 6px #90545d, 0 0 12px 3px #90545d;
-webkit-animation-delay: 1.5s;
animation-delay: 1.5s;
}
.virus:nth-child(9) {
top: 270px;
left: 500px;
width: 22px;
height: 22px;
background-color: #f43a62;
box-shadow: inset 0px 0px 0px 4px #8f2453, 0 0 12px 3px #8f2453;
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.virus:nth-child(10) {
top: 390px;
left: 470px;
width: 22px;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0