Skip to content

Commit f60dcb1

Browse files
Merge pull request #138 from 0b51d14n217/main
Added Cyberpunk glitch button
2 parents 5d8591f + 1e548fd commit f60dcb1

File tree

2 files changed

+99
-2
lines changed

2 files changed

+99
-2
lines changed

buttons/buttons.css

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,3 +2552,92 @@ a:focus-visible {
25522552
content: attr(data-front);
25532553
transform: translateY(0) rotateX(0);
25542554
}
2555+
2556+
.arnav-btn-2, .arnav-btn-2::after {
2557+
width: 200px;
2558+
height: 69px;
2559+
padding-left: 35px;
2560+
font-size: 36px;
2561+
font-family: 'Inter';
2562+
font-weight: 700;
2563+
font-size: 1.5rem;
2564+
background: linear-gradient(45deg, transparent 5%, #F8F005 5%);
2565+
border: 0;
2566+
color: #000;
2567+
line-height: 65px;
2568+
box-shadow: 6px 0px 0px #00E6F6;
2569+
outline: transparent;
2570+
position: relative;
2571+
}
2572+
2573+
.arnav-btn-2::after {
2574+
--slice-0: inset(50% 50% 50% 50%);
2575+
--slice-1: inset(80% -6px 0 0);
2576+
--slice-2: inset(50% -6px 30% 0);
2577+
--slice-3: inset(10% -6px 85% 0);
2578+
--slice-4: inset(40% -6px 43% 0);
2579+
--slice-5: inset(80% -6px 5% 0);
2580+
2581+
content: 'HOVER ME';
2582+
display: block;
2583+
position: absolute;
2584+
top: 0;
2585+
left: 0;
2586+
right: 0;
2587+
bottom: 0;
2588+
background: linear-gradient(45deg, transparent 3%, #00E6F6 3%, #00E6F6 5%, #F8F005 5%);
2589+
text-shadow: -3px -3px 0px #FF013C, 3px 3px 0px #00E6F6;
2590+
clip-path: var(--slice-0);
2591+
}
2592+
2593+
.arnav-btn-2:hover::after {
2594+
animation: 1s arnav-btn-2-glitch;
2595+
animation-timing-function: steps(2, end);
2596+
}
2597+
2598+
@keyframes arnav-btn-2-glitch {
2599+
0% {
2600+
clip-path: var(--slice-1);
2601+
transform: translate(-20px, -10px);
2602+
}
2603+
10% {
2604+
clip-path: var(--slice-3);
2605+
transform: translate(10px, 10px);
2606+
}
2607+
20% {
2608+
clip-path: var(--slice-1);
2609+
transform: translate(-10px, 10px);
2610+
}
2611+
30% {
2612+
clip-path: var(--slice-3);
2613+
transform: translate(0px, 5px);
2614+
}
2615+
40% {
2616+
clip-path: var(--slice-2);
2617+
transform: translate(-5px, 0px);
2618+
}
2619+
50% {
2620+
clip-path: var(--slice-3);
2621+
transform: translate(5px, 0px);
2622+
}
2623+
60% {
2624+
clip-path: var(--slice-4);
2625+
transform: translate(5px, 10px);
2626+
}
2627+
70% {
2628+
clip-path: var(--slice-2);
2629+
transform: translate(-10px, 10px);
2630+
}
2631+
80% {
2632+
clip-path: var(--slice-5);
2633+
transform: translate(20px, -10px);
2634+
}
2635+
90% {
2636+
clip-path: var(--slice-1);
2637+
transform: translate(-10px, 0px);
2638+
}
2639+
100% {
2640+
clip-path: var(--slice-1);
2641+
transform: translate(0);
2642+
}
2643+
}

index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,15 +656,23 @@
656656
<!-- getRicha-btn-1 end -->
657657

658658

659-
<!--0b51d14n217's btn-->
659+
<!--0b51d14n217's btns-->
660660
<div class="button-container">
661661
<a class="arnav-btn-1" data-back="Hover Me" data-front="Hover Me"></a>
662662
<div class="createdby-section">
663663
Created by
664664
<a href="https://github.com/0b51d14n217">0b51d14n217</a>
665665
</div>
666666
</div>
667-
<!--0b51d14n217's btn-->
667+
668+
<div class="button-container">
669+
<a class="arnav-btn-2">HOVER ME</a>
670+
<div class="createdby-section">
671+
Created by
672+
<a href="https://github.com/0b51d14n217">0b51d14n217</a>
673+
</div>
674+
</div>
675+
<!--0b51d14n217's btns-->
668676

669677

670678
</div>

0 commit comments

Comments
 (0)