Advertisement
thotfrnk

404error.scss

Oct 27th, 2024
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. //variables for colours
  2. $light-pink: #f694c1;
  3. $dark-pink: #ff70a6;
  4. $bg-overlay-color: rgba(0, 0, 0, 0.5);
  5.  
  6. //animations
  7.  
  8. /*code from:
  9.  
  10. https://animista.net/play/attention/jello/jello-diagonal-1
  11. https://animista.net/play/text/flicker/text-flicker-in-glow
  12. */
  13.  
  14. @keyframes jello-diagonal-1 {
  15. 0% {
  16. transform: skew(0deg, 0deg);
  17. }
  18. 30% {
  19. transform: skew(25deg, 25deg);
  20. }
  21. 40% {
  22. transform: skew(-15deg, -15deg);
  23. }
  24. 50% {
  25. transform: skew(15deg, 15deg);
  26. }
  27. 65% {
  28. transform: skew(-5deg, -5deg);
  29. }
  30. 75% {
  31. transform: skew(5deg, 5deg);
  32. }
  33. 100% {
  34. transform: skew(0deg, 0deg);
  35. }
  36. }
  37.  
  38. @keyframes text-flicker-in-glow {
  39. 0% {
  40. opacity: 0;
  41. }
  42. 10% {
  43. opacity: 0;
  44. text-shadow: none;
  45. }
  46. 10.1% {
  47. opacity: 1;
  48. text-shadow: none;
  49. }
  50. 10.2% {
  51. opacity: 0;
  52. text-shadow: none;
  53. }
  54. 20% {
  55. opacity: 0;
  56. text-shadow: none;
  57. }
  58. 20.1% {
  59. opacity: 1;
  60. text-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
  61. }
  62. 20.6% {
  63. opacity: 0;
  64. text-shadow: none;
  65. }
  66. 30.1% {
  67. opacity: 1;
  68. text-shadow: 0 0 30px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.25);
  69. }
  70. 55% {
  71. opacity: 1;
  72. text-shadow: 0 0 30px rgba(255, 255, 255, 0.45), 0 0 60px rgba(255, 255, 255, 0.25);
  73. }
  74. 57.1% {
  75. opacity: 1;
  76. text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.35);
  77. }
  78. 65.1% {
  79. opacity: 1;
  80. text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.35), 0 0 100px rgba(255, 255, 255, 0.1);
  81. }
  82. 75% {
  83. opacity: 1;
  84. text-shadow: 0 0 30px rgba(255, 255, 255, 0.55), 0 0 60px rgba(255, 255, 255, 0.35), 0 0 100px rgba(255, 255, 255, 0.1);
  85. }
  86. 100% {
  87. opacity: 1;
  88. text-shadow: 0 0 30px rgba(255, 255, 255, 0.6), 0 0 60px rgba(255, 255, 255, 0.45), 0 0 110px rgba(255, 255, 255, 0.25), 0 0 100px rgba(255, 255, 255, 0.1);
  89. }
  90. }
  91.  
  92. //body styling
  93. .error-page {
  94. position: relative;
  95. height: 100vh;
  96. background-color: #f7f7f7;
  97. overflow: hidden;
  98. display: flex;
  99. justify-content: center;
  100. align-items: center;
  101. text-align: center;
  102.  
  103. &__content {
  104. z-index: 2;
  105. color: white;
  106. text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  107. }
  108.  
  109. &__heading {
  110. font-size: 10rem;
  111. animation: jello-diagonal-1 2s ease;
  112. color: $light-pink;
  113. transition: color 0.3s ease;
  114. }
  115.  
  116. &__message {
  117. font-size: 2rem;
  118. margin-top: 1rem;
  119. color: white;
  120. animation: text-flicker-in-glow 5s ease-out;
  121. }
  122.  
  123. &__link {
  124. margin-top: 2rem;
  125. display: inline-block;
  126. padding: 0.75rem 2rem;
  127. background-color: $dark-pink;
  128. color: white;
  129. text-decoration: none;
  130. font-size: 1.5rem;
  131. border-radius: 5px;
  132. transition: background-color 0.3s ease;
  133.  
  134. &:hover {
  135. background-color: $light-pink;
  136. }
  137. }
  138.  
  139. &__overlay {
  140. position: absolute;
  141. top: 0;
  142. left: 0;
  143. width: 100%;
  144. height: 100%;
  145. background-color: $bg-overlay-color;
  146. clip-path: polygon(0 0, 100% 0, 100% 100%, 0 80%);
  147. z-index: 1;
  148. }
  149.  
  150. &__image {
  151. position: absolute;
  152. top: 0;
  153. left: 0;
  154. width: 100%;
  155. height: 100%;
  156. object-fit: cover;
  157. z-index: 0;
  158. filter: blur(5px);
  159. transform: scale(1.05);
  160. }
  161. }
  162.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement