<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
*{
padding: 0;
margin: 0;
list-style: none;
}
#he{
/* width: 100%; */
width: 120%;
display: flex;/*弹性盒模型*/
justify-content: center;/*主轴方向居中显示*/
align-items: center;/*交叉轴方向居中显示*/
height: 100vh;
background-image: url(./IMG_1593.JPG);
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
}
ul{
height: 400px;
}
li{
float: left;
width: 20px;
height: 20px;
border-radius: 20px;
margin-right: 10px;
}
li:nth-child(1){
background-color: #f077a1;
animation: love1 4s infinite;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
li:nth-child(2){
background-color: #f077a1;
animation: love2 4s infinite;
animation-delay: 0.15s;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
li:nth-child(3){
background-color: #f077a1;
animation: love3 4s infinite;
animation-delay: 0.3s;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
li:nth-child(4){
background-color: #f077a1;
animation: love4 4s infinite;
animation-delay: 0.45s;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
li:nth-child(5){
background-color: #f077a1;
animation: love5 4s infinite;
animation-delay: 0.6s;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
li:nth-child(6){
background-color: #f077a1;
animation: love4 4s infinite;
animation-delay: 0.75s;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
li:nth-child(7){
background-color: #f077a1;
animation: love3 4s infinite;
animation-delay: 0.9s;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
li:nth-child(8){
background-color: #f077a1;
animation: love2 4s infinite;
animation-delay: 1.05s;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
li:nth-child(9){
background-color: #f077a1;
animation: love1 4s infinite;
animation-delay: 1.2s;
border: 0.1rem solid #fff;
border-radius: 2rem;
padding: 0.1em;
box-shadow: 0 0 .1rem #fff,
0 0 .2rem #fff,
0 0 2rem #bc13fe,
inset 0 0 0.3rem #bc13fe;
}
@keyframes love1{
30%,50%{height: 70px; transform: translateY(-30px);}
75%,100%{height: 20px; transform: translateY(0);}
}
@keyframes love2{
30%,50%{height: 135px; transform: translateY(-62.5px);}
75%,100%{height: 20px; transform: translateY(0);}
}
@keyframes love3{
30%,50%{height: 170px; transform: translateY(-75px);}
75%,100%{height: 20px; transform: translateY(0);}
}
@keyframes love4{
30%,50%{height: 195px; transform: translateY(-60px);}
75%,100%{height: 20px; transform: translateY(0);}
}
@keyframes love5{
30%,50%{height: 210px; transform: translateY(-45px);}
75%,100%{height: 20px; transform: translateY(0);}
}
</style>
</head>
<body>
<div id="he">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</body>
</html>
网友评论