レーダー掃引背景Radar Sweep
/* 掃引ビームが左→右へ振れる → 通過した位置の反応点がばねで点灯 → 波紋が広がって消える。
3層(ビーム/反応点/波紋)のタイムラインで「探す→見つける→残響」の物語にしている */
.cg-bg-radar {
position: relative;
width: 220px;
height: 132px;
border-radius: 10px;
overflow: hidden;
background-color: #06140F;
background-image:
radial-gradient(circle at 50% 100%, rgba(60, 220, 160, .16), transparent 66%),
repeating-radial-gradient(circle at 50% 100%, transparent 0 31px, rgba(60, 220, 160, .18) 31px 32px),
linear-gradient(90deg, transparent calc(50% - 1px), rgba(60, 220, 160, .16) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}
/* 掃引アーム(残光つき) */
.cg-bg-radar::before {
content: "";
position: absolute;
left: 50%;
bottom: -1px;
width: 128px;
height: 3px;
transform-origin: 0 50%;
border-radius: 2px;
background: linear-gradient(90deg, rgba(126, 255, 200, .95), rgba(126, 255, 200, 0));
box-shadow: 0 0 10px rgba(90, 240, 180, .5);
animation: cg-bg-radar-arm 5.6s cubic-bezier(.5, 0, .5, 1) infinite;
}
/* アームが通り過ぎた側にうっすら残る掃引跡 */
.cg-bg-radar::after {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at 50% 100%, rgba(90, 240, 180, .22), transparent 58%);
animation: cg-bg-radar-after 5.6s ease-in-out infinite;
}
.cg-bg-radar-blip {
position: absolute;
width: 8px;
height: 8px;
border-radius: 50%;
background: #9BFFD4;
box-shadow: 0 0 10px rgba(126, 255, 200, .95);
opacity: 0;
animation: cg-bg-radar-blip 5.6s cubic-bezier(.34, 1.56, .64, 1) infinite;
}
.cg-bg-radar-b1 { left: 25%; top: 46%; }
.cg-bg-radar-b2 { left: 71%; top: 31%; animation-delay: 2.5s; }
.cg-bg-radar-ping {
position: absolute;
left: 25%;
top: 46%;
width: 8px;
height: 8px;
border-radius: 50%;
border: 1px solid rgba(126, 255, 200, .85);
opacity: 0;
animation: cg-bg-radar-ping 5.6s ease-out infinite;
}
@keyframes cg-bg-radar-arm {
0% { transform: rotate(180deg); opacity: .3; }
8% { opacity: 1; }
46% { transform: rotate(268deg); }
54% { transform: rotate(276deg); }
92% { opacity: 1; }
100% { transform: rotate(360deg); opacity: .3; }
}
@keyframes cg-bg-radar-after {
0%, 100% { opacity: .25; }
30% { opacity: .6; }
70% { opacity: .4; }
}
@keyframes cg-bg-radar-blip {
0%, 15% { opacity: 0; transform: scale(.25); }
21% { opacity: 1; transform: scale(1.6); }
28% { transform: scale(1); }
62% { opacity: .5; }
100% { opacity: 0; transform: scale(.8); }
}
@keyframes cg-bg-radar-ping {
0%, 17% { opacity: 0; transform: scale(.6); }
23% { opacity: .85; }
58%, 100% { opacity: 0; transform: scale(4.4); }
}
/* 静止形: アームを右上に構え、反応点は点灯済み・波紋は広がりきった状態で止める */
@media (prefers-reduced-motion: reduce) {
.cg-bg-radar::before,
.cg-bg-radar::after,
.cg-bg-radar-blip,
.cg-bg-radar-ping { animation: none; }
.cg-bg-radar::before { transform: rotate(304deg); opacity: 1; }
.cg-bg-radar::after { opacity: .45; }
.cg-bg-radar-blip { opacity: 1; transform: none; }
.cg-bg-radar-ping { opacity: .4; transform: scale(2.6); }
}
<div class="cg-bg-radar">
<i class="cg-bg-radar-blip cg-bg-radar-b1"></i>
<i class="cg-bg-radar-blip cg-bg-radar-b2"></i>
<i class="cg-bg-radar-ping"></i>
</div>