Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <style>
  6.  
  7.  
  8.  
  9. .center-text {
  10. margin: auto;
  11. font-family: 'Arial';
  12. font-size:80px;
  13. }
  14.  
  15. .glitch {
  16. position: relative;
  17. color: black;
  18. mix-blend-mode: lighten;
  19. }
  20. .glitch:before, .glitch:after {
  21. content: attr(data-text);
  22. position: absolute;
  23. top: 0;
  24. width: 100%;
  25. background: white;
  26. clip: rect(0, 0, 0, 0);
  27. }
  28. .glitch:before {
  29. left: -1px;
  30. text-shadow: 1px 0 rgba(173, 36, 85);
  31. }
  32. .glitch:after {
  33. left: 1px;
  34. text-shadow: -1px 0 rgba(0, 0, 255);
  35. }
  36. .glitch:hover:before {
  37. text-shadow: 4px 0 rgba(173, 36, 85);
  38. animation: glitch-loop-1 0.8s infinite ease-in-out alternate-reverse;
  39. }
  40. .glitch:hover:after {
  41. text-shadow: -5px 0 rgba(132, 62, 117);
  42. animation: glitch-loop-2 0.8s infinite ease-in-out alternate-reverse;
  43. }
  44.  
  45. @-webkit-keyframes glitch-loop-1 {
  46. 0% {
  47. clip: rect(36px, 9999px, 9px, 0);
  48. }
  49. 25% {
  50. clip: rect(25px, 9999px, 99px, 0);
  51. }
  52. 50% {
  53. clip: rect(50px, 9999px, 102px, 0);
  54. }
  55. 75% {
  56. clip: rect(30px, 9999px, 92px, 0);
  57. }
  58. 100% {
  59. clip: rect(91px, 9999px, 98px, 0);
  60. }
  61. }
  62.  
  63. @keyframes glitch-loop-1 {
  64. 0% {
  65. clip: rect(36px, 9999px, 9px, 0);
  66. }
  67. 25% {
  68. clip: rect(25px, 9999px, 99px, 0);
  69. }
  70. 50% {
  71. clip: rect(50px, 9999px, 102px, 0);
  72. }
  73. 75% {
  74. clip: rect(30px, 9999px, 92px, 0);
  75. }
  76. 100% {
  77. clip: rect(91px, 9999px, 98px, 0);
  78. }
  79. }
  80. @-webkit-keyframes glitch-loop-2 {
  81. 0% {
  82. top: -1px;
  83. left: 1px;
  84. clip: rect(65px, 9999px, 119px, 0);
  85. }
  86. 25% {
  87. top: -6px;
  88. left: 4px;
  89. clip: rect(79px, 9999px, 19px, 0);
  90. }
  91. 50% {
  92. top: -3px;
  93. left: 2px;
  94. clip: rect(68px, 9999px, 11px, 0);
  95. }
  96. 75% {
  97. top: 0px;
  98. left: -4px;
  99. clip: rect(95px, 9999px, 53px, 0);
  100. }
  101. 100% {
  102. top: -1px;
  103. left: -1px;
  104. clip: rect(31px, 9999px, 149px, 0);
  105. }
  106. }
  107. @keyframes glitch-loop-2 {
  108. 0% {
  109. top: -1px;
  110. left: 1px;
  111. clip: rect(65px, 9999px, 119px, 0);
  112. }
  113. 25% {
  114. top: -6px;
  115. left: 4px;
  116. clip: rect(79px, 9999px, 19px, 0);
  117. }
  118. 50% {
  119. top: -3px;
  120. left: 2px;
  121. clip: rect(68px, 9999px, 11px, 0);
  122. }
  123. 75% {
  124. top: 0px;
  125. left: -4px;
  126. clip: rect(95px, 9999px, 53px, 0);
  127. }
  128. 100% {
  129. top: -1px;
  130. left: -1px;
  131. clip: rect(31px, 9999px, 149px, 0);
  132. }
  133. }
  134.  
  135. </style>
  136. </head>
  137.  
  138. <body>
  139.  
  140. <div class="center">
  141. <h2 class="center-text glitch is-glitching" data-text="home."> <span>home.</span></h2>
  142. </div>
  143.  
  144.  
  145. </body>
  146. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement