Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <style>
- .center-text {
- margin: auto;
- font-family: 'Arial';
- font-size:80px;
- }
- .glitch {
- position: relative;
- color: black;
- mix-blend-mode: lighten;
- }
- .glitch:before, .glitch:after {
- content: attr(data-text);
- position: absolute;
- top: 0;
- width: 100%;
- background: white;
- clip: rect(0, 0, 0, 0);
- }
- .glitch:before {
- left: -1px;
- text-shadow: 1px 0 rgba(173, 36, 85);
- }
- .glitch:after {
- left: 1px;
- text-shadow: -1px 0 rgba(0, 0, 255);
- }
- .glitch:hover:before {
- text-shadow: 4px 0 rgba(173, 36, 85);
- animation: glitch-loop-1 0.8s infinite ease-in-out alternate-reverse;
- }
- .glitch:hover:after {
- text-shadow: -5px 0 rgba(132, 62, 117);
- animation: glitch-loop-2 0.8s infinite ease-in-out alternate-reverse;
- }
- @-webkit-keyframes glitch-loop-1 {
- 0% {
- clip: rect(36px, 9999px, 9px, 0);
- }
- 25% {
- clip: rect(25px, 9999px, 99px, 0);
- }
- 50% {
- clip: rect(50px, 9999px, 102px, 0);
- }
- 75% {
- clip: rect(30px, 9999px, 92px, 0);
- }
- 100% {
- clip: rect(91px, 9999px, 98px, 0);
- }
- }
- @keyframes glitch-loop-1 {
- 0% {
- clip: rect(36px, 9999px, 9px, 0);
- }
- 25% {
- clip: rect(25px, 9999px, 99px, 0);
- }
- 50% {
- clip: rect(50px, 9999px, 102px, 0);
- }
- 75% {
- clip: rect(30px, 9999px, 92px, 0);
- }
- 100% {
- clip: rect(91px, 9999px, 98px, 0);
- }
- }
- @-webkit-keyframes glitch-loop-2 {
- 0% {
- top: -1px;
- left: 1px;
- clip: rect(65px, 9999px, 119px, 0);
- }
- 25% {
- top: -6px;
- left: 4px;
- clip: rect(79px, 9999px, 19px, 0);
- }
- 50% {
- top: -3px;
- left: 2px;
- clip: rect(68px, 9999px, 11px, 0);
- }
- 75% {
- top: 0px;
- left: -4px;
- clip: rect(95px, 9999px, 53px, 0);
- }
- 100% {
- top: -1px;
- left: -1px;
- clip: rect(31px, 9999px, 149px, 0);
- }
- }
- @keyframes glitch-loop-2 {
- 0% {
- top: -1px;
- left: 1px;
- clip: rect(65px, 9999px, 119px, 0);
- }
- 25% {
- top: -6px;
- left: 4px;
- clip: rect(79px, 9999px, 19px, 0);
- }
- 50% {
- top: -3px;
- left: 2px;
- clip: rect(68px, 9999px, 11px, 0);
- }
- 75% {
- top: 0px;
- left: -4px;
- clip: rect(95px, 9999px, 53px, 0);
- }
- 100% {
- top: -1px;
- left: -1px;
- clip: rect(31px, 9999px, 149px, 0);
- }
- }
- </style>
- </head>
- <body>
- <div class="center">
- <h2 class="center-text glitch is-glitching" data-text="home."> <span>home.</span></h2>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement