diff --git a/Fronted Projects/01.Neon Button Animation/index.html b/Fronted Projects/01.Neon Button Animation/index.html new file mode 100644 index 0000000..ad7cb26 --- /dev/null +++ b/Fronted Projects/01.Neon Button Animation/index.html @@ -0,0 +1,37 @@ + + + + + + + + Glowing Neon button + + + + + + + + + + + Neon Button + + + + + + + Another Neon + + + + + + + Again Neon! + + + + \ No newline at end of file diff --git a/Fronted Projects/01.Neon Button Animation/style.css b/Fronted Projects/01.Neon Button Animation/style.css new file mode 100644 index 0000000..b5ef057 --- /dev/null +++ b/Fronted Projects/01.Neon Button Animation/style.css @@ -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%; + } +}