<head>

<meta charset="UTF-8">

<title></title>

<style type="text/css">

#box{

position: relative;

}

span{

position: absolute;

width: 30px;

height: 30px;

background: white;

border-radius: 50%;

}

span:nth-child(1){

-webkit-animation: a 1.5s infinite linear;

}

span:nth-child(2){

-webkit-animation: b 1.5s infinite linear;

}

 

@-webkit-keyframes a{

0%{-webkit-transform: translateX(0px); opacity: 1;}

50%{-webkit-transform: translateX(80px); opacity: 0.5;}

100%{-webkit-transform: translateX(0px); opacity: 1;}

}

@-webkit-keyframes b{

0%{-webkit-transform: translateX(80px); opacity: 1;}

50%{-webkit-transform: translateX(0px); opacity: 0.5;}

100%{-webkit-transform: translateX(80px); opacity: 1;}

}

</style>

</head>

<body style="background-color: darkcyan;">

<div id="box">

<span></span>

<span></span>

</div>

</body>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2021-10-05
  • 2021-12-06
  • 2021-07-14
  • 2021-12-15
  • 2021-09-21
猜你喜欢
  • 2021-05-19
  • 2022-02-27
  • 2022-02-24
  • 2021-08-14
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
相关资源
相似解决方案