Last active
November 3, 2016 17:31
-
-
Save ManUtopiK/b4f12a05ea8082838755210c555f4719 to your computer and use it in GitHub Desktop.
Glitch Effect
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
<section id="intro-frame"> | |
<div id="call2action"> | |
<div class="game-title"> | |
<span>Can You</span><br> | |
<div class="align-box"> | |
<span class="emphasized glitch" data-text="hack"> | |
Hack | |
</span> | |
<span class="small">the</span><br> | |
</div> | |
<span class="emphasized glitch" data-text="vault?"> | |
Vault? | |
</span> | |
</div> | |
<button id="accept-challenge" type="button" class="button"> | |
Bring it on! | |
</button> | |
</div> | |
</section> |
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
/* Glitch Effect */ | |
#intro-frame .glitch { | |
position: relative; | |
} | |
#intro-frame .glitch:before, | |
#intro-frame .glitch:after { | |
background: #333; | |
} | |
#intro-frame .glitch:after { | |
content: attr(data-text); | |
position: absolute; | |
left: 2px; | |
text-shadow: -1px 0 red; | |
top: 0; | |
overflow: hidden; | |
clip: rect(0, 900px, 0, 0); | |
animation: noise-anim 2s infinite linear alternate-reverse; | |
} | |
#intro-frame .glitch:before { | |
content: attr(data-text); | |
position: absolute; | |
left: -2px; | |
text-shadow: 1px 0 blue; | |
top: 0; | |
overflow: hidden; | |
clip: rect(0, 900px, 0, 0); | |
animation: noise-anim-2 3s infinite linear alternate-reverse; | |
} | |
#intro-frame .glitch:last-child:before { | |
animation: noise-anim-3 2s infinite linear alternate-reverse; | |
} | |
#intro-frame .glitch:last-child:after { | |
animation: noise-anim-4 2s infinite linear alternate-reverse; | |
} | |
@keyframes noise-anim { | |
0% { | |
clip: rect(0,0,0,0); | |
} | |
54% { | |
clip: rect(0,0,0,0); | |
} | |
55% { | |
clip: rect(93px, 9999px, 93px, 0); | |
} | |
60% { | |
clip: rect(39px, 9999px, 10px, 0); | |
} | |
65% { | |
clip: rect(3px, 9999px, 15px, 0); | |
} | |
70% { | |
clip: rect(59px, 9999px, 63px, 0); | |
} | |
75% { | |
clip: rect(18px, 9999px, 96px, 0); | |
} | |
80% { | |
clip: rect(87px, 9999px, 13px, 0); | |
} | |
85% { | |
clip: rect(99px, 9999px, 83px, 0); | |
} | |
90% { | |
clip: rect(20px, 9999px, 25px, 0); | |
} | |
95% { | |
clip: rect(53px, 9999px, 3px, 0); | |
} | |
100% { | |
clip: rect(8px, 9999px, 46px, 0); | |
} | |
} | |
@keyframes noise-anim-2 { | |
0% { | |
clip: rect(0,0,0,0); | |
} | |
54% { | |
clip: rect(0,0,0,0); | |
} | |
55% { | |
clip: rect(15px, 9999px, 39px, 0); | |
} | |
60% { | |
clip: rect(14px, 9999px, 49px, 0); | |
} | |
65% { | |
clip: rect(79px, 9999px, 95px, 0); | |
} | |
70% { | |
clip: rect(33px, 9999px, 62px, 0); | |
} | |
75% { | |
clip: rect(58px, 9999px, 59px, 0); | |
} | |
80% { | |
clip: rect(70px, 9999px, 12px, 0); | |
} | |
85% { | |
clip: rect(98px, 9999px, 60px, 0); | |
} | |
90% { | |
clip: rect(81px, 9999px, 91px, 0); | |
} | |
95% { | |
clip: rect(68px, 9999px, 25px, 0); | |
} | |
100% { | |
clip: rect(34px, 9999px, 33px, 0); | |
} | |
} | |
@keyframes noise-anim-3 { | |
0% { | |
clip: rect(0,0,0,0); | |
} | |
84% { | |
clip: rect(0,0,0,0); | |
} | |
85% { | |
clip: rect(118px, 9999px, 91px, 0); | |
} | |
90% { | |
clip: rect(53px, 9999px, 78px, 0); | |
} | |
95% { | |
clip: rect(61px, 9999px, 113px, 0); | |
} | |
100% { | |
clip: rect(57px, 9999px, 93px, 0); | |
} | |
} | |
@keyframes noise-anim-4 { | |
0% { | |
clip: rect(0,0,0,0); | |
} | |
84% { | |
clip: rect(0,0,0,0); | |
} | |
85% { | |
clip: rect(65px, 9999px, 83px, 0); | |
} | |
90% { | |
clip: rect(62px, 9999px, 123px, 0); | |
} | |
95% { | |
clip: rect(69px, 9999px, 66px, 0); | |
} | |
100% { | |
clip: rect(111px, 9999px, 92px, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment