genzuki

glow in text cr mitsuyafuji on instagram

Sep 4th, 2021 (edited)
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <!--cr mitsuyafuji on insta if using -->
  2. <style>
  3.  
  4. body {
  5. margin: auto;
  6. background-color: tranparent;
  7. background-size: cover;
  8. }
  9.  
  10. p {
  11. margin: 5px;
  12. }
  13.  
  14. h1, p {
  15. text-align: center;
  16. line-height: 18px;
  17. font-family: arial;
  18. font-size: 1.2em;
  19. }
  20.  
  21. .glowIn {
  22. text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000, 0 0;
  23. color: #fff;
  24. }
  25. .glowIn span {
  26. animation: glow-in 2s both;
  27. }
  28.  
  29. @keyframes glow-in {
  30. from {
  31. opacity: 0;
  32. }
  33. 65% {
  34. opacity: 1;
  35. }
  36. 75% {
  37. opacity: 0.90;
  38. }
  39. to {
  40. opacity: 1;
  41. }
  42. }
  43. </style>
  44. <h1 class="glowIn"></h1>
  45. <p class="glowIn">glow in text! if u want it to loop add 'infinite' where it says animation!</p>
  46.  
  47. <script>
  48. "use strict";
  49. var glowInTexts = document.querySelectorAll(".glowIn");
  50. glowInTexts.forEach(function (glowInText) {
  51. var letters = glowInText.textContent.split("");
  52. glowInText.textContent = "";
  53. letters.forEach(function (letter, i) {
  54. var span = document.createElement("span");
  55. span.textContent = letter;
  56. span.style.animationDelay = i * 0.05 + "s";
  57. glowInText.append(span);
  58. });
  59. });
  60. </script>
Add Comment
Please, Sign In to add comment