html代码:
<body style="background: #f9553f;"> <div id="preloader-5"> <span></span> <span></span> <span></span> </div> </body>
css代码:
#preloader-5{ position: relative; } #preloader-5 span{ position:absolute; width:50px; height: 50px; border:5px solid #fff; border-radius: 999px; opacity: 0; animation: radar 2s infinite linear; } #preloader-5 span:nth-child(1){ animation-delay: 0s; } #preloader-5 span:nth-child(2){ animation-delay: 0.66s; } #preloader-5 span:nth-child(3){ animation-delay: 1.33s; } @keyframes radar{ 0%{transform: scale(0);opacity: 0;} 25%{transform: scale(0);opacity: 0.5;} 50%{transform: scale(1);opacity: 1.0;} 75%{transform: scale(1.5);opacity: 0.5;} 100%{transform: scale(2);opacity: 0;} }
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。