Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions Fronted Projects/01.Neon Button Animation/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Glowing Neon button</title>

<link rel="stylesheet" href="style.css">
</head>

<body>
<a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
Neon Button
</a>
<a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
Another Neon
</a>
<a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
Again Neon!
</a>
</body>

</html>
138 changes: 138 additions & 0 deletions Fronted Projects/01.Neon Button Animation/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&display=swap");

* {
padding: 0;
margin: 0;
box-sizing: border-box;
}

body {
font-family: "Raleway", sans-serif;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
background-color: #111;
height: 100vh;
}

a {
position: relative;
display: inline-block;
padding: 20px 25px;
margin: 20px;
color: #03e9f4;
text-decoration: none;
text-transform: uppercase;
transition: 0.5s;
letter-spacing: 4px;
overflow: hidden;
}

a:hover {
background: #03e9f4;
color: #050801;
box-shadow: 0 0 5px #03e9f4, 0 0 25px #03e9f4, 0 0 50px #03e9f4,
0 0 200px #03e9f4;

/* Defines reflection of border box */
-webkit-box-reflect: below 5px linear-gradient(transparent, #0005);
}

a:nth-child(1) {
filter: hue-rotate(270deg);
}

a:nth-child(2) {
filter: hue-rotate(110deg);
}

/* // For animation */

a span {
position: absolute;
display: block;
}

/* Top side */
a span:nth-child(1) {
background: linear-gradient(90deg, transparent, #03e9f4);
top: 0;
left: 0;
width: 100%;
height: 2px;
animation: animate1 1s linear infinite;
}

@keyframes animate1 {
0% {
left: -100%;
}
50%,
100% {
left: 100%;
}
}

/* Right side */
a span:nth-child(2) {
background: linear-gradient(180deg, transparent, #03e9f4);
top: -100%;
right: 0;
width: 2px;
height: 100%;
animation: animate2 1s linear infinite;
animation-delay: 0.25s;
}

@keyframes animate2 {
0% {
top: -100%;
}
50%,
100% {
top: 100%;
}
}

/* Bottom side */
a span:nth-child(3) {
background: linear-gradient(270deg, transparent, #03e9f4);
bottom: 0;
right: 0;
width: 100%;
height: 2px;
animation: animate3 1s linear infinite;
animation-delay: 0.5s;
}

@keyframes animate3 {
0% {
right: -100%;
}
50%,
100% {
right: 100%;
}
}

/* Right side */
a span:nth-child(4) {
bottom: -100%;
left: 0;
width: 2px;
height: 100%;
background: linear-gradient(360deg, transparent, #03e9f4);
animation: animate4 1s linear infinite;
animation-delay: 0.75s;
}

@keyframes animate4 {
0% {
bottom: -100%;
}
50%,
100% {
bottom: 100%;
}
}