Skip to content

Instantly share code, notes, and snippets.

@zz85
Last active January 17, 2017 04:38
Show Gist options
  • Save zz85/618cfa1473194399d468b6829c0acdad to your computer and use it in GitHub Desktop.
Save zz85/618cfa1473194399d468b6829c0acdad to your computer and use it in GitHub Desktop.
.glitch {
width: 100%
}
.hero-wrap .glitch:after,
.hero-wrap .glitch:before {
content: attr(data-text);
position: absolute;
width: 100%;
top: 0;
color: #222222;
background: transparent;
overflow: hidden;
clip: rect(0, 900px, 0, 0)
}
.hero-wrap .glitch:before {
left: -1px;
text-shadow: 1px 0 green;
animation: noise-anim-2 3s infinite linear alternate-reverse
}
.hero-wrap .glitch:after {
left: 1px;
text-shadow: -1px 0 yellow;
animation: noise-anim 3s infinite linear alternate-reverse
}
@keyframes noise-anim {
0% {
clip: rect(43px, 9999px, 76px, 0)
}
10% {
clip: rect(31px, 9999px, 63px, 0)
}
20% {
clip: rect(22px, 9999px, 22px, 0)
}
30% {
clip: rect(16px, 9999px, 13px, 0)
}
40% {
clip: rect(19px, 9999px, 22px, 0)
}
50% {
clip: rect(65px, 9999px, 15px, 0)
}
60% {
clip: rect(72px, 9999px, 73px, 0)
}
70% {
clip: rect(21px, 9999px, 74px, 0)
}
80% {
clip: rect(64px, 9999px, 68px, 0)
}
90% {
clip: rect(23px, 9999px, 62px, 0)
}
100% {
clip: rect(24px, 9999px, 62px, 0)
}
}
@keyframes noise-anim-2 {
0% {
clip: rect(11px, 9999px, 60px, 0)
}
10% {
clip: rect(83px, 9999px, 75px, 0)
}
20% {
clip: rect(87px, 9999px, 75px, 0)
}
30% {
clip: rect(76px, 9999px, 81px, 0)
}
40% {
clip: rect(72px, 9999px, 38px, 0)
}
50% {
clip: rect(82px, 9999px, 82px, 0)
}
60% {
clip: rect(52px, 9999px, 29px, 0)
}
70% {
clip: rect(21px, 9999px, 48px, 0)
}
80% {
clip: rect(13px, 9999px, 47px, 0)
}
90% {
clip: rect(7px, 9999px, 26px, 0)
}
100% {
clip: rect(41px, 9999px, 53px, 0)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment