百度一下学习学习简单的动画
这个动画我们一起来看一下怎么实现
首先安排css部分
.circle_box{ margin: 0 auto; background-image: linear-gradient(to right, rgba(29, 230, 179, 0.3), rgb(0, 247, 255)); width: 500px; height: 300px; display: flex; justify-content: center; align-items: center; } .circleTrends{ position: relative; width: 100px; height: 100px; display: flex; justify-content: center; align-items: center; } .circleTrends span{ position: absolute; border:8px solid #fff; border-top: 8px solid transparent; border-radius: 99px; } .circleTrends span:nth-child(1){ width: 80px; height: 80px; animation: span-one 2s infinite linear ; } .circleTrends span:nth-child(2){ width: 40px; height: 40px; top:23px; left:23px; animation: span-two 1s infinite linear ; } @keyframes span-one{ 0%{transform: rotate(360deg);opacity: 1.0;} 50%{transform: rotate(180deg);opacity: 0.5;} 100%{transform: rotate(0deg);opacity: 0;} } @keyframes spin-two{ 0%{transform: rotate(0deg); opacity: 0.5;} 50%{transform: rotate(180deg); opacity: 1;} 100%{transform: rotate(360deg);opacity: 0.5;} }
html部分
<div class="circle_box"> <div class="circleTrends"> <span></span> <span></span> </div> </div>
这年头没有免费的东西,视频转化gif上传动图,水印vip用户才可去掉,将就着看(✪ω✪)