-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2875 from guranshdeol/hacktoberfest
Radar Scanner Animation added under HacktoberFest
- Loading branch information
Showing
3 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Neon Radar Scanner Animation</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<div class="radar-container"> | ||
<div class="radar-line"></div> | ||
<div class="dot"></div> | ||
<div class="dot"></div> | ||
<div class="dot"></div> | ||
<div class="dot"></div> | ||
<div class="dot"></div> | ||
<div class="dot"></div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"artName": "Radar Scannar Animation", | ||
"githubHandle": "guranshdeol" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
|
||
/* Reset */ | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background: #0a0a0a; | ||
color: #fff; | ||
font-family: Arial, sans-serif; | ||
overflow: hidden; | ||
} | ||
|
||
/* Radar container */ | ||
.radar-container { | ||
position: relative; | ||
width: 300px; | ||
height: 300px; | ||
border: 3px solid rgba(0, 255, 128, 0.3); | ||
border-radius: 50%; | ||
background: radial-gradient(circle, rgba(0, 255, 128, 0.1) 0%, rgba(0, 0, 0, 0.8) 70%); | ||
box-shadow: 0 0 20px rgba(0, 255, 128, 0.5); | ||
overflow: hidden; | ||
} | ||
|
||
/* Sweeping radar line */ | ||
.radar-line { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
background: conic-gradient( | ||
from 90deg, | ||
rgba(0, 255, 128, 0.2) 0deg, | ||
rgba(0, 255, 128, 0.3) 45deg, | ||
transparent 180deg, | ||
transparent | ||
); | ||
border-radius: 50%; | ||
animation: rotateRadar 4s infinite linear; | ||
z-index: 2; | ||
} | ||
|
||
/* Radar dots */ | ||
.dot { | ||
position: absolute; | ||
width: 8px; | ||
height: 8px; | ||
border-radius: 50%; | ||
background: rgba(0, 255, 128, 0.8); | ||
box-shadow: 0 0 10px rgba(0, 255, 128, 0.8); | ||
animation: pulse 2s infinite ease-in-out; | ||
} | ||
|
||
/* Placing radar dots randomly within the radar container */ | ||
.dot:nth-child(1) { top: 40%; left: 60%; animation-delay: 0.5s; } | ||
.dot:nth-child(2) { top: 30%; left: 20%; animation-delay: 1s; } | ||
.dot:nth-child(3) { top: 70%; left: 80%; animation-delay: 1.5s; } | ||
.dot:nth-child(4) { top: 50%; left: 40%; animation-delay: 2s; } | ||
.dot:nth-child(5) { top: 20%; left: 70%; animation-delay: 2.5s; } | ||
.dot:nth-child(6) { top: 80%; left: 30%; animation-delay: 3s; } | ||
|
||
/* Rotate radar animation */ | ||
@keyframes rotateRadar { | ||
0% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
|
||
/* Dot pulse animation */ | ||
@keyframes pulse { | ||
0%, 100% { | ||
transform: scale(1); | ||
opacity: 1; | ||
} | ||
50% { | ||
transform: scale(1.3); | ||
opacity: 0.5; | ||
} | ||
} |