texto-style.css 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. @import url('https://fonts.googleapis.com/css?family=Roboto:300');
  2. .div {
  3. display: inline-block;
  4. overflow: hidden;
  5. white-space: nowrap;
  6. }
  7. .div:first-of-type {
  8. /* For increasing performance
  9. ID/Class should've been used.
  10. For a small demo
  11. it's okaish for now */
  12. animation: showup 7s infinite;
  13. }
  14. .div:last-of-type {
  15. width: 0px;
  16. animation: reveal 7s infinite;
  17. }
  18. .div:last-of-type span {
  19. margin-left: -400px;
  20. animation: slidein 7s infinite;
  21. }
  22. @keyframes showup {
  23. 0% {
  24. opacity: 0;
  25. }
  26. 20% {
  27. opacity: 1;
  28. }
  29. 80% {
  30. opacity: 1;
  31. }
  32. 100% {
  33. opacity: 0;
  34. }
  35. }
  36. @keyframes slidein {
  37. 0% {
  38. margin-left: -800px;
  39. }
  40. 20% {
  41. margin-left: -800px;
  42. }
  43. 35% {
  44. margin-left: 0px;
  45. }
  46. 100% {
  47. margin-left: 0px;
  48. }
  49. }
  50. @keyframes reveal {
  51. 0% {
  52. opacity: 0;
  53. width: 0px;
  54. }
  55. 20% {
  56. opacity: 1;
  57. width: 0px;
  58. }
  59. 30% {
  60. width: 400px;
  61. }
  62. 80% {
  63. opacity: 1;
  64. }
  65. 100% {
  66. opacity: 0;
  67. width: 400px;
  68. }
  69. }