css模拟雷达扫描动画效果代码

代码语言:html

所属分类:动画

代码描述:css模拟雷达扫描动画效果代码

代码标签: css 模拟 雷达 扫描 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
<style>
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-image: linear-gradient(#252525, #0c0c0c);
}

.radar {
  position: relative;
  width: 60vmin;
  height: 60vmin;
  background: repeating-radial-gradient(transparent, transparent 4.5%, rgba(80, 255, 0, 0.35) 5%, transparent 5.5%) content-box, linear-gradient(transparent 49.7%, rgba(80, 255, 0, 0.2) 49.9%, rgba(80, 255, 0, 0.2) 50.1%, transparent 50.3%) content-box, linear-gradient(to right, transparent 49.7%, rgba(80, 255, 0, 0.2) 49.9%, rgba(80, 255, 0, 0.2) 50.1%, transparent 50.3%) content-box, radial-gradient(#002500, #000500) content-box, linear-gradient(to bottom right, #ccc, #666) border-box;
  border: 2.5vmin solid transparent;
  border-radius: 50%;
  box-sizing: border-box;
  overflow: hidden;
  filter: drop-shadow(1vmin 1vmin 1vmin rgba(0, 0, 0, 0.4));
}
.radar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: conic-gradient(transparent 90%, rgba(80, 255, 0, 0.35));
  border-radius: 50%;
  box-shadow: inset 0 0 2vmin rgba(0, 0, 0, 0.9);
  -webkit-animation: spin 2s linear infinite;
          animation: spin 2s linear infinite;
}
.radar__dot {
  position: absolute;
  width: 3.........完整代码请登录后点击上方下载按钮下载查看

网友评论0